Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Sep 13, 2023
1 parent 61a463f commit 8a950d4
Show file tree
Hide file tree
Showing 494 changed files with 91,617 additions and 12,021 deletions.
4 changes: 2 additions & 2 deletions metricflow/test/query/test_query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,14 @@ def test_date_part_parsing() -> None:
with pytest.raises(UnableToSatisfyQueryError):
query_parser.parse_and_validate_query(
metric_names=["revenue_cumulative"],
group_by=[MockQueryParameter(name="metric_time", date_part=DatePart.DOY)],
group_by=[MockQueryParameter(name="metric_time", date_part=DatePart.YEAR)],
)

# Can't query date part for metrics with offset to grain
with pytest.raises(UnableToSatisfyQueryError):
query_parser.parse_and_validate_query(
metric_names=["revenue_since_start_of_year"],
group_by=[MockQueryParameter(name="metric_time", date_part=DatePart.DAY)],
group_by=[MockQueryParameter(name="metric_time", date_part=DatePart.MONTH)],
)

# Date part is compatible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,25 @@ SELECT
, DATE_TRUNC(revenue_src_10006.created_at, month) AS ds__month
, DATE_TRUNC(revenue_src_10006.created_at, quarter) AS ds__quarter
, DATE_TRUNC(revenue_src_10006.created_at, year) AS ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS ds__extract_month
, EXTRACT(isoweek FROM revenue_src_10006.created_at) AS ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS ds__extract_day
, EXTRACT(dayofweek FROM revenue_src_10006.created_at) AS ds__extract_dow
, EXTRACT(dayofyear FROM revenue_src_10006.created_at) AS ds__extract_doy
, revenue_src_10006.created_at AS company__ds__day
, DATE_TRUNC(revenue_src_10006.created_at, isoweek) AS company__ds__week
, DATE_TRUNC(revenue_src_10006.created_at, month) AS company__ds__month
, DATE_TRUNC(revenue_src_10006.created_at, quarter) AS company__ds__quarter
, DATE_TRUNC(revenue_src_10006.created_at, year) AS company__ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS company__ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS company__ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS company__ds__extract_month
, EXTRACT(isoweek FROM revenue_src_10006.created_at) AS company__ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS company__ds__extract_day
, EXTRACT(dayofweek FROM revenue_src_10006.created_at) AS company__ds__extract_dow
, EXTRACT(dayofyear FROM revenue_src_10006.created_at) AS company__ds__extract_doy
, revenue_src_10006.user_id AS user
, revenue_src_10006.user_id AS company__user
FROM ***************************.fct_revenue revenue_src_10006
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,50 @@ SELECT
, DATE_TRUNC(id_verifications_src_10003.ds, month) AS ds__month
, DATE_TRUNC(id_verifications_src_10003.ds, quarter) AS ds__quarter
, DATE_TRUNC(id_verifications_src_10003.ds, year) AS ds__year
, EXTRACT(year FROM id_verifications_src_10003.ds) AS ds__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS ds__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds) AS ds__extract_month
, EXTRACT(isoweek FROM id_verifications_src_10003.ds) AS ds__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds) AS ds__extract_day
, EXTRACT(dayofweek FROM id_verifications_src_10003.ds) AS ds__extract_dow
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds) AS ds__extract_doy
, id_verifications_src_10003.ds_partitioned AS ds_partitioned__day
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, isoweek) AS ds_partitioned__week
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, month) AS ds_partitioned__month
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, quarter) AS ds_partitioned__quarter
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, year) AS ds_partitioned__year
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_month
, EXTRACT(isoweek FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_day
, EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_dow
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_doy
, id_verifications_src_10003.verification_type
, id_verifications_src_10003.ds AS verification__ds__day
, DATE_TRUNC(id_verifications_src_10003.ds, isoweek) AS verification__ds__week
, DATE_TRUNC(id_verifications_src_10003.ds, month) AS verification__ds__month
, DATE_TRUNC(id_verifications_src_10003.ds, quarter) AS verification__ds__quarter
, DATE_TRUNC(id_verifications_src_10003.ds, year) AS verification__ds__year
, EXTRACT(year FROM id_verifications_src_10003.ds) AS verification__ds__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS verification__ds__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds) AS verification__ds__extract_month
, EXTRACT(isoweek FROM id_verifications_src_10003.ds) AS verification__ds__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds) AS verification__ds__extract_day
, EXTRACT(dayofweek FROM id_verifications_src_10003.ds) AS verification__ds__extract_dow
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds) AS verification__ds__extract_doy
, id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned__day
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, isoweek) AS verification__ds_partitioned__week
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, month) AS verification__ds_partitioned__month
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, quarter) AS verification__ds_partitioned__quarter
, DATE_TRUNC(id_verifications_src_10003.ds_partitioned, year) AS verification__ds_partitioned__year
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_month
, EXTRACT(isoweek FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_day
, EXTRACT(dayofweek FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_dow
, EXTRACT(dayofyear FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_doy
, id_verifications_src_10003.verification_type AS verification__verification_type
, id_verifications_src_10003.verification_id AS verification
, id_verifications_src_10003.user_id AS user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@ SELECT
, 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
, EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year
, EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter
, EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month
, EXTRACT(isoweek FROM users_latest_src_10008.ds) AS ds__extract_week
, EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day
, EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS ds__extract_dow
, EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS ds__extract_doy
, 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
, EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year
, EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter
, EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month
, EXTRACT(isoweek FROM users_latest_src_10008.ds) AS user__ds__extract_week
, EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day
, EXTRACT(dayofweek FROM users_latest_src_10008.ds) AS user__ds__extract_dow
, EXTRACT(dayofyear FROM users_latest_src_10008.ds) AS user__ds__extract_doy
, 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
Expand Up @@ -6,11 +6,25 @@ SELECT
, DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS ds__extract_month
, EXTRACT(week FROM revenue_src_10006.created_at) AS ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS ds__extract_day
, EXTRACT(dow FROM revenue_src_10006.created_at) AS ds__extract_dow
, EXTRACT(doy FROM revenue_src_10006.created_at) AS ds__extract_doy
, revenue_src_10006.created_at AS company__ds__day
, DATE_TRUNC('week', revenue_src_10006.created_at) AS company__ds__week
, DATE_TRUNC('month', revenue_src_10006.created_at) AS company__ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS company__ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS company__ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS company__ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS company__ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS company__ds__extract_month
, EXTRACT(week FROM revenue_src_10006.created_at) AS company__ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS company__ds__extract_day
, EXTRACT(dow FROM revenue_src_10006.created_at) AS company__ds__extract_dow
, EXTRACT(doy FROM revenue_src_10006.created_at) AS company__ds__extract_doy
, revenue_src_10006.user_id AS user
, revenue_src_10006.user_id AS company__user
FROM ***************************.fct_revenue revenue_src_10006
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,50 @@ SELECT
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS ds__year
, EXTRACT(year FROM id_verifications_src_10003.ds) AS ds__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS ds__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds) AS ds__extract_month
, EXTRACT(week FROM id_verifications_src_10003.ds) AS ds__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds) AS ds__extract_day
, EXTRACT(dow FROM id_verifications_src_10003.ds) AS ds__extract_dow
, EXTRACT(doy FROM id_verifications_src_10003.ds) AS ds__extract_doy
, id_verifications_src_10003.ds_partitioned AS ds_partitioned__day
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS ds_partitioned__year
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_month
, EXTRACT(week FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_day
, EXTRACT(dow FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_dow
, EXTRACT(doy FROM id_verifications_src_10003.ds_partitioned) AS ds_partitioned__extract_doy
, id_verifications_src_10003.verification_type
, id_verifications_src_10003.ds AS verification__ds__day
, DATE_TRUNC('week', id_verifications_src_10003.ds) AS verification__ds__week
, DATE_TRUNC('month', id_verifications_src_10003.ds) AS verification__ds__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds) AS verification__ds__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds) AS verification__ds__year
, EXTRACT(year FROM id_verifications_src_10003.ds) AS verification__ds__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds) AS verification__ds__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds) AS verification__ds__extract_month
, EXTRACT(week FROM id_verifications_src_10003.ds) AS verification__ds__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds) AS verification__ds__extract_day
, EXTRACT(dow FROM id_verifications_src_10003.ds) AS verification__ds__extract_dow
, EXTRACT(doy FROM id_verifications_src_10003.ds) AS verification__ds__extract_doy
, id_verifications_src_10003.ds_partitioned AS verification__ds_partitioned__day
, DATE_TRUNC('week', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__week
, DATE_TRUNC('month', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__month
, DATE_TRUNC('quarter', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__quarter
, DATE_TRUNC('year', id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__year
, EXTRACT(year FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_year
, EXTRACT(quarter FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_quarter
, EXTRACT(month FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_month
, EXTRACT(week FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_week
, EXTRACT(day FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_day
, EXTRACT(dow FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_dow
, EXTRACT(doy FROM id_verifications_src_10003.ds_partitioned) AS verification__ds_partitioned__extract_doy
, id_verifications_src_10003.verification_type AS verification__verification_type
, id_verifications_src_10003.verification_id AS verification
, id_verifications_src_10003.user_id AS user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@ SELECT
, 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
, EXTRACT(year FROM users_latest_src_10008.ds) AS ds__extract_year
, EXTRACT(quarter FROM users_latest_src_10008.ds) AS ds__extract_quarter
, EXTRACT(month FROM users_latest_src_10008.ds) AS ds__extract_month
, EXTRACT(week FROM users_latest_src_10008.ds) AS ds__extract_week
, EXTRACT(day FROM users_latest_src_10008.ds) AS ds__extract_day
, EXTRACT(dow FROM users_latest_src_10008.ds) AS ds__extract_dow
, EXTRACT(doy FROM users_latest_src_10008.ds) AS ds__extract_doy
, 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
, EXTRACT(year FROM users_latest_src_10008.ds) AS user__ds__extract_year
, EXTRACT(quarter FROM users_latest_src_10008.ds) AS user__ds__extract_quarter
, EXTRACT(month FROM users_latest_src_10008.ds) AS user__ds__extract_month
, EXTRACT(week FROM users_latest_src_10008.ds) AS user__ds__extract_week
, EXTRACT(day FROM users_latest_src_10008.ds) AS user__ds__extract_day
, EXTRACT(dow FROM users_latest_src_10008.ds) AS user__ds__extract_dow
, EXTRACT(doy FROM users_latest_src_10008.ds) AS user__ds__extract_doy
, 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
Expand Up @@ -6,11 +6,25 @@ SELECT
, DATE_TRUNC('month', revenue_src_10006.created_at) AS ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS ds__extract_month
, EXTRACT(week FROM revenue_src_10006.created_at) AS ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS ds__extract_day
, EXTRACT(dow FROM revenue_src_10006.created_at) AS ds__extract_dow
, EXTRACT(doy FROM revenue_src_10006.created_at) AS ds__extract_doy
, revenue_src_10006.created_at AS company__ds__day
, DATE_TRUNC('week', revenue_src_10006.created_at) AS company__ds__week
, DATE_TRUNC('month', revenue_src_10006.created_at) AS company__ds__month
, DATE_TRUNC('quarter', revenue_src_10006.created_at) AS company__ds__quarter
, DATE_TRUNC('year', revenue_src_10006.created_at) AS company__ds__year
, EXTRACT(year FROM revenue_src_10006.created_at) AS company__ds__extract_year
, EXTRACT(quarter FROM revenue_src_10006.created_at) AS company__ds__extract_quarter
, EXTRACT(month FROM revenue_src_10006.created_at) AS company__ds__extract_month
, EXTRACT(week FROM revenue_src_10006.created_at) AS company__ds__extract_week
, EXTRACT(day FROM revenue_src_10006.created_at) AS company__ds__extract_day
, EXTRACT(dow FROM revenue_src_10006.created_at) AS company__ds__extract_dow
, EXTRACT(doy FROM revenue_src_10006.created_at) AS company__ds__extract_doy
, revenue_src_10006.user_id AS user
, revenue_src_10006.user_id AS company__user
FROM ***************************.fct_revenue revenue_src_10006
Loading

0 comments on commit 8a950d4

Please sign in to comment.