Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move snapshot files to enumerated paths #613

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion metricflow/protocols/sql_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@


class SqlEngine(Enum):
"""Enumeration of SQL engines, including ones that are not yet supported."""
"""Enumeration of supported SQL engines.

Values are normalized engine names used for things like snapshot file locations.
"""

BIGQUERY = "BigQuery"
DUCKDB = "DuckDB"
Expand Down
4 changes: 2 additions & 2 deletions metricflow/test/integration/test_rendered_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_render_query( # noqa: D
system_schema=it_helpers.mf_system_schema, source_schema=it_helpers.source_schema
),
exclude_line_regex=_EXCLUDE_TABLE_ALIAS_REGEX,
additional_sub_directories_for_snapshots=(it_helpers.sql_client.__class__.__name__,),
additional_sub_directories_for_snapshots=(it_helpers.sql_client.sql_engine_type.value,),
)


Expand All @@ -59,5 +59,5 @@ def test_render_write_to_table_query( # noqa: D
system_schema=it_helpers.mf_system_schema, source_schema=it_helpers.source_schema
),
exclude_line_regex=_EXCLUDE_TABLE_ALIAS_REGEX,
additional_sub_directories_for_snapshots=(it_helpers.sql_client.__class__.__name__,),
additional_sub_directories_for_snapshots=(it_helpers.sql_client.sql_engine_type.value,),
)
2 changes: 1 addition & 1 deletion metricflow/test/model/test_data_warehouse_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def test_build_metric_tasks( # noqa: D
incomparable_strings_replacement_function=make_schema_replacement_function(
system_schema=mf_test_session_state.mf_system_schema, source_schema=mf_test_session_state.mf_source_schema
),
additional_sub_directories_for_snapshots=(sql_client.__class__.__name__,),
additional_sub_directories_for_snapshots=(sql_client.sql_engine_type.value,),
)


Expand Down
4 changes: 2 additions & 2 deletions metricflow/test/plan_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def assert_execution_plan_text_equal( # noqa: D
system_schema=mf_test_session_state.mf_system_schema,
source_schema=mf_test_session_state.mf_source_schema,
),
additional_sub_directories_for_snapshots=(sql_client.__class__.__name__,),
additional_sub_directories_for_snapshots=(sql_client.sql_engine_type.value,),
)


Expand All @@ -244,5 +244,5 @@ def assert_dataflow_plan_text_equal( # noqa: D
plan=dataflow_plan,
plan_snapshot_text=dataflow_plan_as_text(dataflow_plan),
incomparable_strings_replacement_function=replace_dataset_id_hash,
additional_sub_directories_for_snapshots=(sql_client.__class__.__name__,),
additional_sub_directories_for_snapshots=(sql_client.sql_engine_type.value,),
)
Loading