diff --git a/metricflow/sql/sql_table.py b/metricflow-semantics/metricflow_semantics/sql/sql_table.py similarity index 100% rename from metricflow/sql/sql_table.py rename to metricflow-semantics/metricflow_semantics/sql/sql_table.py diff --git a/metricflow/plan_conversion/time_spine.py b/metricflow-semantics/metricflow_semantics/time/time_spine_source.py similarity index 96% rename from metricflow/plan_conversion/time_spine.py rename to metricflow-semantics/metricflow_semantics/time/time_spine_source.py index cd568c617f..82f1a97acc 100644 --- a/metricflow/plan_conversion/time_spine.py +++ b/metricflow-semantics/metricflow_semantics/time/time_spine_source.py @@ -6,9 +6,9 @@ from dbt_semantic_interfaces.protocols import SemanticManifest from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity -from metricflow_semantics.specs.time_dimension_spec import DEFAULT_TIME_GRANULARITY -from metricflow.sql.sql_table import SqlTable +from metricflow_semantics.specs.time_dimension_spec import DEFAULT_TIME_GRANULARITY +from metricflow_semantics.sql.sql_table import SqlTable logger = logging.getLogger(__name__) @@ -38,7 +38,7 @@ def create_from_manifest(semantic_manifest: SemanticManifest) -> Dict[TimeGranul time_spine_sources = { time_spine.primary_column.time_granularity: TimeSpineSource( schema_name=time_spine.node_relation.schema_name, - table_name=time_spine.node_relation.relation_name, + table_name=time_spine.node_relation.alias, db_name=time_spine.node_relation.database, time_column_name=time_spine.primary_column.name, time_column_granularity=time_spine.primary_column.time_granularity, diff --git a/metricflow/dataflow/builder/dataflow_plan_builder.py b/metricflow/dataflow/builder/dataflow_plan_builder.py index b3b1ef4f3e..9538f1c87f 100644 --- a/metricflow/dataflow/builder/dataflow_plan_builder.py +++ b/metricflow/dataflow/builder/dataflow_plan_builder.py @@ -51,6 +51,7 @@ from metricflow_semantics.specs.where_filter.where_filter_spec import WhereFilterSpec from metricflow_semantics.specs.where_filter.where_filter_transform import WhereSpecFactory from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.time.dateutil_adjuster import DateutilTimePeriodAdjuster from metricflow.dataflow.builder.node_data_set import DataflowPlanNodeOutputDataSetResolver @@ -91,7 +92,6 @@ PredicatePushdownState, PreJoinNodeProcessor, ) -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/metricflow/dataflow/builder/source_node.py b/metricflow/dataflow/builder/source_node.py index ad3d437d64..ba48632eb5 100644 --- a/metricflow/dataflow/builder/source_node.py +++ b/metricflow/dataflow/builder/source_node.py @@ -10,13 +10,13 @@ from metricflow_semantics.specs.column_assoc import ColumnAssociationResolver from metricflow_semantics.specs.group_by_metric_spec import GroupByMetricSpec from metricflow_semantics.specs.query_spec import MetricFlowQuerySpec +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.dataflow.dataflow_plan import DataflowPlanNode from metricflow.dataflow.nodes.metric_time_transform import MetricTimeDimensionTransformNode from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataset.convert_semantic_model import SemanticModelToDataSetConverter from metricflow.dataset.semantic_model_adapter import SemanticModelDataSet -from metricflow.plan_conversion.time_spine import TimeSpineSource @dataclass(frozen=True) diff --git a/metricflow/dataflow/nodes/write_to_table.py b/metricflow/dataflow/nodes/write_to_table.py index d27d974a20..a17c4bd7a7 100644 --- a/metricflow/dataflow/nodes/write_to_table.py +++ b/metricflow/dataflow/nodes/write_to_table.py @@ -4,13 +4,13 @@ from typing import Sequence from metricflow_semantics.dag.id_prefix import IdPrefix, StaticIdPrefix +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.visitor import VisitorOutputT from metricflow.dataflow.dataflow_plan import ( DataflowPlanNode, DataflowPlanNodeVisitor, ) -from metricflow.sql.sql_table import SqlTable @dataclass(frozen=True) diff --git a/metricflow/dataset/convert_semantic_model.py b/metricflow/dataset/convert_semantic_model.py index 155d0b0eba..198bdbce87 100644 --- a/metricflow/dataset/convert_semantic_model.py +++ b/metricflow/dataset/convert_semantic_model.py @@ -32,10 +32,11 @@ from metricflow_semantics.specs.dimension_spec import DimensionSpec from metricflow_semantics.specs.entity_spec import EntitySpec from metricflow_semantics.specs.time_dimension_spec import DEFAULT_TIME_GRANULARITY, TimeDimensionSpec +from metricflow_semantics.sql.sql_table import SqlTable +from metricflow_semantics.time.time_spine_source import TIME_SPINE_DATA_SET_DESCRIPTION, TimeSpineSource from metricflow.dataset.semantic_model_adapter import SemanticModelDataSet from metricflow.dataset.sql_dataset import SqlDataSet -from metricflow.plan_conversion.time_spine import TIME_SPINE_DATA_SET_DESCRIPTION, TimeSpineSource from metricflow.sql.sql_exprs import ( SqlColumnReference, SqlColumnReferenceExpression, @@ -49,7 +50,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/metricflow/engine/metricflow_engine.py b/metricflow/engine/metricflow_engine.py index f260cf0993..0eedc652e1 100644 --- a/metricflow/engine/metricflow_engine.py +++ b/metricflow/engine/metricflow_engine.py @@ -18,9 +18,7 @@ from metricflow_semantics.mf_logging.pretty_print import mf_pformat from metricflow_semantics.model.linkable_element_property import LinkableElementProperty from metricflow_semantics.model.semantic_manifest_lookup import SemanticManifestLookup -from metricflow_semantics.model.semantics.linkable_element import ( - LinkableDimension, -) +from metricflow_semantics.model.semantics.linkable_element import LinkableDimension from metricflow_semantics.model.semantics.semantic_model_lookup import SemanticModelLookup from metricflow_semantics.naming.linkable_spec_name import StructuredLinkableSpecName from metricflow_semantics.protocols.query_parameter import GroupByParameter, MetricQueryParameter, OrderByQueryParameter @@ -32,7 +30,9 @@ from metricflow_semantics.specs.query_param_implementations import SavedQueryParameter from metricflow_semantics.specs.query_spec import MetricFlowQuerySpec from metricflow_semantics.specs.spec_set import InstanceSpecSet +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.time.time_source import TimeSource +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder @@ -52,10 +52,8 @@ from metricflow.execution.execution_plan import ExecutionPlan, SqlQuery from metricflow.execution.executor import SequentialPlanExecutor from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient from metricflow.sql.optimizer.optimization_levels import SqlQueryOptimizationLevel -from metricflow.sql.sql_table import SqlTable from metricflow.telemetry.models import TelemetryLevel from metricflow.telemetry.reporter import TelemetryReporter, log_call diff --git a/metricflow/execution/execution_plan.py b/metricflow/execution/execution_plan.py index a117d73803..50b2668c3b 100644 --- a/metricflow/execution/execution_plan.py +++ b/metricflow/execution/execution_plan.py @@ -9,11 +9,11 @@ from metricflow_semantics.dag.id_prefix import IdPrefix, StaticIdPrefix from metricflow_semantics.dag.mf_dag import DagId, DagNode, DisplayedProperty, MetricFlowDag, NodeId from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.visitor import Visitable from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/metricflow/plan_conversion/dataflow_to_sql.py b/metricflow/plan_conversion/dataflow_to_sql.py index 6100bfc8d5..3da50fe816 100644 --- a/metricflow/plan_conversion/dataflow_to_sql.py +++ b/metricflow/plan_conversion/dataflow_to_sql.py @@ -40,6 +40,7 @@ from metricflow_semantics.specs.time_dimension_spec import TimeDimensionSpec from metricflow_semantics.sql.sql_join_type import SqlJoinType from metricflow_semantics.time.time_constants import ISO8601_PYTHON_FORMAT +from metricflow_semantics.time.time_spine_source import TIME_SPINE_DATA_SET_DESCRIPTION, TimeSpineSource from metricflow.dataflow.dataflow_plan import ( DataflowPlanNode, @@ -101,7 +102,6 @@ ColumnEqualityDescription, SqlQueryPlanJoinBuilder, ) -from metricflow.plan_conversion.time_spine import TIME_SPINE_DATA_SET_DESCRIPTION, TimeSpineSource from metricflow.protocols.sql_client import SqlEngine from metricflow.sql.optimizer.optimization_levels import ( SqlQueryOptimizationLevel, diff --git a/metricflow/sql/sql_column.py b/metricflow/sql/sql_column.py index 673ce764fc..2765d36a7d 100644 --- a/metricflow/sql/sql_column.py +++ b/metricflow/sql/sql_column.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from typing import Optional -from metricflow.sql.sql_table import SqlTable +from metricflow_semantics.sql.sql_table import SqlTable @dataclass(frozen=True, order=True) diff --git a/metricflow/sql/sql_plan.py b/metricflow/sql/sql_plan.py index 5c07a33fac..4d0d467710 100644 --- a/metricflow/sql/sql_plan.py +++ b/metricflow/sql/sql_plan.py @@ -10,11 +10,11 @@ from metricflow_semantics.dag.id_prefix import IdPrefix, StaticIdPrefix from metricflow_semantics.dag.mf_dag import DagId, DagNode, DisplayedProperty, MetricFlowDag from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.visitor import VisitorOutputT from typing_extensions import override from metricflow.sql.sql_exprs import SqlExpressionNode -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/tests_metricflow/dataflow/builder/test_node_data_set.py b/tests_metricflow/dataflow/builder/test_node_data_set.py index ab3083b84c..1402472277 100644 --- a/tests_metricflow/dataflow/builder/test_node_data_set.py +++ b/tests_metricflow/dataflow/builder/test_node_data_set.py @@ -16,21 +16,21 @@ from metricflow_semantics.specs.entity_spec import LinklessEntitySpec from metricflow_semantics.specs.measure_spec import MeasureSpec from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow_semantics.test_helpers.snapshot_helpers import assert_spec_set_snapshot_equal +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.dataflow.builder.node_data_set import DataflowPlanNodeOutputDataSetResolver from metricflow.dataflow.nodes.join_to_base import JoinDescription, JoinOnEntitiesNode from metricflow.dataflow.nodes.read_sql_source import ReadSqlSourceNode from metricflow.dataset.sql_dataset import SqlDataSet -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.sql.sql_exprs import SqlColumnReference, SqlColumnReferenceExpression from metricflow.sql.sql_plan import ( SqlSelectColumn, SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.fixtures.manifest_fixtures import MetricFlowEngineTestFixture, SemanticManifestSetup logger = logging.getLogger(__name__) diff --git a/tests_metricflow/dataflow/test_sql_column.py b/tests_metricflow/dataflow/test_sql_column.py index dbe560ef0d..7379050171 100644 --- a/tests_metricflow/dataflow/test_sql_column.py +++ b/tests_metricflow/dataflow/test_sql_column.py @@ -1,7 +1,8 @@ from __future__ import annotations +from metricflow_semantics.sql.sql_table import SqlTable + from metricflow.sql.sql_column import SqlColumn -from metricflow.sql.sql_table import SqlTable def test_sql_column() -> None: # noqa: D103 diff --git a/tests_metricflow/dataflow/test_sql_table.py b/tests_metricflow/dataflow/test_sql_table.py index c0b1f61ebc..f6154855ca 100644 --- a/tests_metricflow/dataflow/test_sql_table.py +++ b/tests_metricflow/dataflow/test_sql_table.py @@ -1,8 +1,7 @@ from __future__ import annotations import pytest - -from metricflow.sql.sql_table import SqlTable +from metricflow_semantics.sql.sql_table import SqlTable def test_sql_table() -> None: # noqa: D103 diff --git a/tests_metricflow/execution/test_tasks.py b/tests_metricflow/execution/test_tasks.py index 6e24ec85de..eed19ed646 100644 --- a/tests_metricflow/execution/test_tasks.py +++ b/tests_metricflow/execution/test_tasks.py @@ -3,6 +3,7 @@ from metricflow_semantics.dag.mf_dag import DagId from metricflow_semantics.random_id import random_id from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.data_table.mf_table import MetricFlowDataTable @@ -14,7 +15,6 @@ ) from metricflow.execution.executor import SequentialPlanExecutor from metricflow.protocols.sql_client import SqlClient, SqlEngine -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_data_table import assert_data_tables_equal diff --git a/tests_metricflow/fixtures/dataflow_fixtures.py b/tests_metricflow/fixtures/dataflow_fixtures.py index 5ce317989c..76604df857 100644 --- a/tests_metricflow/fixtures/dataflow_fixtures.py +++ b/tests_metricflow/fixtures/dataflow_fixtures.py @@ -6,9 +6,9 @@ from metricflow_semantics.query.query_parser import MetricFlowQueryParser from metricflow_semantics.specs.column_assoc import ColumnAssociationResolver from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient from tests_metricflow.fixtures.manifest_fixtures import MetricFlowEngineTestFixture, SemanticManifestSetup from tests_metricflow.fixtures.sql_client_fixtures import sql_client # noqa: F401, F403 diff --git a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py index 40552cc14e..dc4df06c61 100644 --- a/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py +++ b/tests_metricflow/fixtures/sql_clients/adapter_backed_ddl_client.py @@ -5,11 +5,12 @@ import time from typing import Optional +from metricflow_semantics.sql.sql_table import SqlTable + from dbt_metricflow.cli.dbt_connectors.adapter_backed_client import AdapterBackedSqlClient from metricflow.data_table.mf_column import ColumnDescription from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlEngine -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py index 8bc4ee8726..89a9ffaaea 100644 --- a/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py +++ b/tests_metricflow/fixtures/sql_clients/ddl_sql_client.py @@ -3,9 +3,10 @@ from abc import abstractmethod from typing import Optional, Protocol +from metricflow_semantics.sql.sql_table import SqlTable + from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient -from metricflow.sql.sql_table import SqlTable class SqlClientWithDDLMethods(SqlClient, Protocol): diff --git a/tests_metricflow/fixtures/table_fixtures.py b/tests_metricflow/fixtures/table_fixtures.py index 8571eacf1d..11f7f7f19d 100644 --- a/tests_metricflow/fixtures/table_fixtures.py +++ b/tests_metricflow/fixtures/table_fixtures.py @@ -8,8 +8,8 @@ from dbt_semantic_interfaces.type_enums import TimeGranularity from metricflow_semantics.model.semantic_manifest_lookup import SemanticManifestLookup from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow_semantics.time.time_spine_source import TimeSpineSource -from metricflow.plan_conversion.time_spine import TimeSpineSource from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods from tests_metricflow.source_schema_tools import create_tables_listed_in_table_snapshot_repository from tests_metricflow.table_snapshot.table_snapshots import ( diff --git a/tests_metricflow/integration/conftest.py b/tests_metricflow/integration/conftest.py index 19e0d13edc..7fef0e7567 100644 --- a/tests_metricflow/integration/conftest.py +++ b/tests_metricflow/integration/conftest.py @@ -8,9 +8,9 @@ from metricflow_semantics.specs.dunder_column_association_resolver import DunderColumnAssociationResolver from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow_semantics.test_helpers.time_helpers import ConfigurableTimeSource +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.engine.metricflow_engine import MetricFlowEngine -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient diff --git a/tests_metricflow/integration/test_configured_cases.py b/tests_metricflow/integration/test_configured_cases.py index 4f9c563d6b..2193c9d1d5 100644 --- a/tests_metricflow/integration/test_configured_cases.py +++ b/tests_metricflow/integration/test_configured_cases.py @@ -15,9 +15,9 @@ from metricflow_semantics.protocols.query_parameter import DimensionOrEntityQueryParameter from metricflow_semantics.specs.query_param_implementations import DimensionOrEntityParameter, TimeDimensionParameter from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration +from metricflow_semantics.time.time_spine_source import TimeSpineSource from metricflow.engine.metricflow_engine import MetricFlowQueryRequest -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient from metricflow.sql.sql_exprs import ( SqlCastToTimestampExpression, diff --git a/tests_metricflow/mf_logging/test_dag_to_text.py b/tests_metricflow/mf_logging/test_dag_to_text.py index 079d31bd90..ed2fb4ac73 100644 --- a/tests_metricflow/mf_logging/test_dag_to_text.py +++ b/tests_metricflow/mf_logging/test_dag_to_text.py @@ -9,6 +9,7 @@ from metricflow_semantics.dag.dag_to_text import MetricFlowDagTextFormatter from metricflow_semantics.dag.mf_dag import DagId from metricflow_semantics.mf_logging.formatting import indent +from metricflow_semantics.sql.sql_table import SqlTable from metricflow.sql.sql_exprs import ( SqlStringExpression, @@ -19,7 +20,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable logger = logging.getLogger(__name__) diff --git a/tests_metricflow/plan_conversion/test_time_spine.py b/tests_metricflow/plan_conversion/test_time_spine.py index 931e728c92..654058da6a 100644 --- a/tests_metricflow/plan_conversion/test_time_spine.py +++ b/tests_metricflow/plan_conversion/test_time_spine.py @@ -5,8 +5,8 @@ from dbt_semantic_interfaces.type_enums import TimeGranularity from metricflow_semantics.filters.time_constraint import TimeRangeConstraint from metricflow_semantics.model.semantic_manifest_lookup import SemanticManifestLookup +from metricflow_semantics.time.time_spine_source import TimeSpineSource -from metricflow.plan_conversion.time_spine import TimeSpineSource from metricflow.protocols.sql_client import SqlClient diff --git a/tests_metricflow/sql/optimizer/test_column_pruner.py b/tests_metricflow/sql/optimizer/test_column_pruner.py index a73feb22a5..89b2b68fd8 100644 --- a/tests_metricflow/sql/optimizer/test_column_pruner.py +++ b/tests_metricflow/sql/optimizer/test_column_pruner.py @@ -3,6 +3,7 @@ import pytest from _pytest.fixtures import FixtureRequest from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.sql.optimizer.column_pruner import SqlColumnPrunerOptimizer @@ -22,7 +23,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_sql_plan import assert_default_rendered_sql_equal diff --git a/tests_metricflow/sql/optimizer/test_rewriting_sub_query_reducer.py b/tests_metricflow/sql/optimizer/test_rewriting_sub_query_reducer.py index 1536f30e66..82ac8e20a9 100644 --- a/tests_metricflow/sql/optimizer/test_rewriting_sub_query_reducer.py +++ b/tests_metricflow/sql/optimizer/test_rewriting_sub_query_reducer.py @@ -3,6 +3,7 @@ import pytest from _pytest.fixtures import FixtureRequest from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.sql.optimizer.rewriting_sub_query_reducer import SqlRewritingSubQueryReducer @@ -23,7 +24,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_sql_plan import assert_default_rendered_sql_equal diff --git a/tests_metricflow/sql/optimizer/test_sub_query_reducer.py b/tests_metricflow/sql/optimizer/test_sub_query_reducer.py index dc2bc157ee..25e92766f0 100644 --- a/tests_metricflow/sql/optimizer/test_sub_query_reducer.py +++ b/tests_metricflow/sql/optimizer/test_sub_query_reducer.py @@ -3,6 +3,7 @@ import pytest from _pytest.fixtures import FixtureRequest from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.sql.optimizer.sub_query_reducer import SqlSubQueryReducer @@ -19,7 +20,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_sql_plan import assert_default_rendered_sql_equal diff --git a/tests_metricflow/sql/optimizer/test_table_alias_simplifier.py b/tests_metricflow/sql/optimizer/test_table_alias_simplifier.py index d603054f38..f3a40191b5 100644 --- a/tests_metricflow/sql/optimizer/test_table_alias_simplifier.py +++ b/tests_metricflow/sql/optimizer/test_table_alias_simplifier.py @@ -3,6 +3,7 @@ import pytest from _pytest.fixtures import FixtureRequest from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.sql.optimizer.table_alias_simplifier import SqlTableAliasSimplifier @@ -19,7 +20,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_sql_plan import assert_default_rendered_sql_equal diff --git a/tests_metricflow/sql/test_engine_specific_rendering.py b/tests_metricflow/sql/test_engine_specific_rendering.py index 6ba8f8fc15..b47f0027a9 100644 --- a/tests_metricflow/sql/test_engine_specific_rendering.py +++ b/tests_metricflow/sql/test_engine_specific_rendering.py @@ -4,6 +4,7 @@ import pytest from _pytest.fixtures import FixtureRequest +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.protocols.sql_client import SqlClient @@ -24,7 +25,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable from tests_metricflow.sql.compare_sql_plan import assert_rendered_sql_equal diff --git a/tests_metricflow/sql/test_sql_plan_render.py b/tests_metricflow/sql/test_sql_plan_render.py index 14dd164a89..3d4c761836 100644 --- a/tests_metricflow/sql/test_sql_plan_render.py +++ b/tests_metricflow/sql/test_sql_plan_render.py @@ -6,6 +6,7 @@ import pytest from _pytest.fixtures import FixtureRequest from metricflow_semantics.sql.sql_join_type import SqlJoinType +from metricflow_semantics.sql.sql_table import SqlTable, SqlTableType from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.protocols.sql_client import SqlClient @@ -26,7 +27,6 @@ SqlSelectStatementNode, SqlTableFromClauseNode, ) -from metricflow.sql.sql_table import SqlTable, SqlTableType from tests_metricflow.sql.compare_sql_plan import assert_rendered_sql_equal logger = logging.getLogger(__name__) diff --git a/tests_metricflow/sql_clients/test_sql_client.py b/tests_metricflow/sql_clients/test_sql_client.py index 6b7eef10a0..b229822c26 100644 --- a/tests_metricflow/sql_clients/test_sql_client.py +++ b/tests_metricflow/sql_clients/test_sql_client.py @@ -7,11 +7,11 @@ from dbt_semantic_interfaces.test_utils import as_datetime from metricflow_semantics.random_id import random_id from metricflow_semantics.sql.sql_bind_parameters import SqlBindParameters +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.data_table.mf_table import MetricFlowDataTable from metricflow.protocols.sql_client import SqlClient, SqlEngine -from metricflow.sql.sql_table import SqlTable from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods from tests_metricflow.sql.compare_data_table import assert_data_tables_equal diff --git a/tests_metricflow/table_snapshot/table_snapshots.py b/tests_metricflow/table_snapshot/table_snapshots.py index a0800eaf4f..eaeb3bfc4d 100644 --- a/tests_metricflow/table_snapshot/table_snapshots.py +++ b/tests_metricflow/table_snapshot/table_snapshots.py @@ -13,10 +13,10 @@ from dbt_semantic_interfaces.enum_extension import assert_values_exhausted from dbt_semantic_interfaces.implementations.base import FrozenBaseModel from metricflow_semantics.specs.non_additive_dimension_spec import hash_items +from metricflow_semantics.sql.sql_table import SqlTable from metricflow.data_table.column_types import CellValue from metricflow.data_table.mf_table import MetricFlowDataTable -from metricflow.sql.sql_table import SqlTable from tests_metricflow.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods logger = logging.getLogger(__name__) diff --git a/tests_metricflow/table_snapshot/test_source_schema.py b/tests_metricflow/table_snapshot/test_source_schema.py index 5b9e77364d..0a84912189 100644 --- a/tests_metricflow/table_snapshot/test_source_schema.py +++ b/tests_metricflow/table_snapshot/test_source_schema.py @@ -4,10 +4,10 @@ import warnings import pytest +from metricflow_semantics.sql.sql_table import SqlTable from metricflow_semantics.test_helpers.config_helpers import MetricFlowTestConfiguration from metricflow.protocols.sql_client import SqlClient, SqlEngine -from metricflow.sql.sql_table import SqlTable from tests_metricflow.fixtures.table_fixtures import CONFIGURED_SOURCE_TABLE_SNAPSHOT_REPOSITORY from tests_metricflow.source_schema_tools import get_populate_source_schema_shell_command from tests_metricflow.sql.compare_data_table import assert_data_tables_equal