From 7a4a17e5ac0295511c1cc153b0b02afc96a93f02 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Thu, 17 Aug 2023 11:37:58 -0700 Subject: [PATCH] Update snapshot generation script (#728) --- .changes/unreleased/Under the Hood-20230816-150030.yaml | 5 +++++ metricflow/test/generate_snapshots.py | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20230816-150030.yaml diff --git a/.changes/unreleased/Under the Hood-20230816-150030.yaml b/.changes/unreleased/Under the Hood-20230816-150030.yaml new file mode 100644 index 0000000000..e67bf22c95 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20230816-150030.yaml @@ -0,0 +1,5 @@ +kind: Under the Hood +time: 2023-08-16T15:00:30.486465-07:00 +custom: + Author: courtneyholcomb + Issue: "728" diff --git a/metricflow/test/generate_snapshots.py b/metricflow/test/generate_snapshots.py index 7a9c4ead29..ec937d2080 100644 --- a/metricflow/test/generate_snapshots.py +++ b/metricflow/test/generate_snapshots.py @@ -65,6 +65,7 @@ class MetricFlowTestCredentialSetForAllEngines(FrozenBaseModel): # noqa: D snowflake: MetricFlowTestCredentialSet big_query: MetricFlowTestCredentialSet databricks: MetricFlowTestCredentialSet + postgres: MetricFlowTestCredentialSet @property def as_configurations(self) -> Sequence[MetricFlowTestConfiguration]: # noqa: D @@ -89,6 +90,10 @@ def as_configurations(self) -> Sequence[MetricFlowTestConfiguration]: # noqa: D engine=SqlEngine.DATABRICKS, credential_set=self.databricks, ), + MetricFlowTestConfiguration( + engine=SqlEngine.POSTGRES, + credential_set=self.postgres, + ), ) @@ -175,8 +180,6 @@ def run_cli() -> None: # noqa: D ) for test_configuration in credential_sets.as_configurations: - if test_configuration.engine is SqlEngine.BIGQUERY: - continue logger.info( f"Running tests for {test_configuration.engine} with URL: {test_configuration.credential_set.engine_url}" )