Skip to content

Commit

Permalink
Update test snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Sep 19, 2023
1 parent ef42f2d commit d9e2114
Show file tree
Hide file tree
Showing 25 changed files with 653 additions and 432 deletions.
3 changes: 2 additions & 1 deletion metricflow/test/generate_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def run_tests(test_configuration: MetricFlowTestConfiguration, test_file_paths:
engine_name = test_configuration.engine.value.lower()
os.environ["MF_TEST_ADAPTER_TYPE"] = engine_name
hatch_env = f"{engine_name}-env"
use_persistent_source_schema = test_configuration.engine != SqlEngine.POSTGRES
# use_persistent_source_schema = test_configuration.engine != SqlEngine.POSTGRES
use_persistent_source_schema = False
run_command(
f"hatch -v run {hatch_env}:pytest -x -vv -n 4 "
f"--overwrite-snapshots"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS ds__week
, DATE_TRUNC(users_latest_src_10008.ds, month) AS ds__month
, DATE_TRUNC(users_latest_src_10008.ds, quarter) AS ds__quarter
, DATE_TRUNC(users_latest_src_10008.ds, year) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS ds_latest__week
, DATE_TRUNC(users_latest_src_10008.ds, month) AS ds_latest__month
, DATE_TRUNC(users_latest_src_10008.ds, quarter) AS ds_latest__quarter
, DATE_TRUNC(users_latest_src_10008.ds, year) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS user__ds__week
, DATE_TRUNC(users_latest_src_10008.ds, month) AS user__ds__month
, DATE_TRUNC(users_latest_src_10008.ds, quarter) AS user__ds__quarter
, DATE_TRUNC(users_latest_src_10008.ds, year) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC(users_latest_src_10008.ds, isoweek) AS user__ds_latest__week
, DATE_TRUNC(users_latest_src_10008.ds, month) AS user__ds_latest__month
, DATE_TRUNC(users_latest_src_10008.ds, quarter) AS user__ds_latest__quarter
, DATE_TRUNC(users_latest_src_10008.ds, year) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-- Read Elements From Semantic Model 'users_latest'
SELECT
users_latest_src_10008.ds AS ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds__year
users_latest_src_10008.ds AS ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS ds_latest__year
, users_latest_src_10008.home_state_latest
, users_latest_src_10008.ds AS user__ds__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds__year
, users_latest_src_10008.ds AS user__ds_latest__day
, DATE_TRUNC('week', users_latest_src_10008.ds) AS user__ds_latest__week
, DATE_TRUNC('month', users_latest_src_10008.ds) AS user__ds_latest__month
, DATE_TRUNC('quarter', users_latest_src_10008.ds) AS user__ds_latest__quarter
, DATE_TRUNC('year', users_latest_src_10008.ds) AS user__ds_latest__year
, users_latest_src_10008.home_state_latest AS user__home_state_latest
, users_latest_src_10008.user_id AS user
FROM ***************************.dim_users_latest users_latest_src_10008
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
['ds__day',
'ds__month',
'ds__quarter',
'ds__week',
'ds__year',
'ds_partitioned__day',
'ds_partitioned__month',
'ds_partitioned__quarter',
'ds_partitioned__week',
'ds_partitioned__year',
'identity_verifications',
'user',
'verification',
'verification__ds__day',
'verification__ds__month',
'verification__ds__quarter',
'verification__ds__week',
'verification__ds__year',
'verification__ds_partitioned__day',
'verification__ds_partitioned__month',
'verification__ds_partitioned__quarter',
'verification__ds_partitioned__week',
'verification__ds_partitioned__year',
'verification__user',
'verification__verification_type',
'verification_type']
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
['ds_latest__day',
'ds_latest__month',
'ds_latest__quarter',
'ds_latest__week',
'ds_latest__year',
'home_state_latest',
'user',
'user__ds_latest__day',
'user__ds_latest__month',
'user__ds_latest__quarter',
'user__ds_latest__week',
'user__ds_latest__year',
'user__home_state_latest']
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ FROM (
, subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month
, subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter
, subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year
, subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day
, subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week
, subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month
, subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter
, subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year
, subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day
, subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week
, subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month
Expand All @@ -119,8 +124,11 @@ FROM (
, subq_3.account_id AS account_id
, subq_3.customer_id AS customer_id
, subq_3.account_id__customer_id AS account_id__customer_id
, subq_3.bridge_account__account_id AS bridge_account__account_id
, subq_3.bridge_account__customer_id AS bridge_account__customer_id
, subq_3.extra_dim AS extra_dim
, subq_3.account_id__extra_dim AS account_id__extra_dim
, subq_3.bridge_account__extra_dim AS bridge_account__extra_dim
, subq_5.customer_name AS customer_id__customer_name
, subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight
FROM (
Expand All @@ -138,9 +146,17 @@ FROM (
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, month) AS account_id__ds_partitioned__month
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, quarter) AS account_id__ds_partitioned__quarter
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, year) AS account_id__ds_partitioned__year
, bridge_table_src_10011.extra_dim AS bridge_account__extra_dim
, bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, isoweek) AS bridge_account__ds_partitioned__week
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, month) AS bridge_account__ds_partitioned__month
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, quarter) AS bridge_account__ds_partitioned__quarter
, DATE_TRUNC(bridge_table_src_10011.ds_partitioned, year) AS bridge_account__ds_partitioned__year
, bridge_table_src_10011.account_id
, bridge_table_src_10011.customer_id
, bridge_table_src_10011.customer_id AS account_id__customer_id
, bridge_table_src_10011.account_id AS bridge_account__account_id
, bridge_table_src_10011.customer_id AS bridge_account__customer_id
FROM ***************************.bridge_table bridge_table_src_10011
) subq_3
LEFT OUTER JOIN (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ FROM (
, subq_3.account_id__ds_partitioned__month AS account_id__ds_partitioned__month
, subq_3.account_id__ds_partitioned__quarter AS account_id__ds_partitioned__quarter
, subq_3.account_id__ds_partitioned__year AS account_id__ds_partitioned__year
, subq_3.bridge_account__ds_partitioned__day AS bridge_account__ds_partitioned__day
, subq_3.bridge_account__ds_partitioned__week AS bridge_account__ds_partitioned__week
, subq_3.bridge_account__ds_partitioned__month AS bridge_account__ds_partitioned__month
, subq_3.bridge_account__ds_partitioned__quarter AS bridge_account__ds_partitioned__quarter
, subq_3.bridge_account__ds_partitioned__year AS bridge_account__ds_partitioned__year
, subq_5.ds_partitioned__day AS customer_id__ds_partitioned__day
, subq_5.ds_partitioned__week AS customer_id__ds_partitioned__week
, subq_5.ds_partitioned__month AS customer_id__ds_partitioned__month
Expand All @@ -119,8 +124,11 @@ FROM (
, subq_3.account_id AS account_id
, subq_3.customer_id AS customer_id
, subq_3.account_id__customer_id AS account_id__customer_id
, subq_3.bridge_account__account_id AS bridge_account__account_id
, subq_3.bridge_account__customer_id AS bridge_account__customer_id
, subq_3.extra_dim AS extra_dim
, subq_3.account_id__extra_dim AS account_id__extra_dim
, subq_3.bridge_account__extra_dim AS bridge_account__extra_dim
, subq_5.customer_name AS customer_id__customer_name
, subq_5.customer_atomic_weight AS customer_id__customer_atomic_weight
FROM (
Expand All @@ -138,9 +146,17 @@ FROM (
, DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__month
, DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__quarter
, DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS account_id__ds_partitioned__year
, bridge_table_src_10011.extra_dim AS bridge_account__extra_dim
, bridge_table_src_10011.ds_partitioned AS bridge_account__ds_partitioned__day
, DATE_TRUNC('week', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__week
, DATE_TRUNC('month', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__month
, DATE_TRUNC('quarter', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__quarter
, DATE_TRUNC('year', bridge_table_src_10011.ds_partitioned) AS bridge_account__ds_partitioned__year
, bridge_table_src_10011.account_id
, bridge_table_src_10011.customer_id
, bridge_table_src_10011.customer_id AS account_id__customer_id
, bridge_table_src_10011.account_id AS bridge_account__account_id
, bridge_table_src_10011.customer_id AS bridge_account__customer_id
FROM ***************************.bridge_table bridge_table_src_10011
) subq_3
LEFT OUTER JOIN (
Expand Down
Loading

0 comments on commit d9e2114

Please sign in to comment.