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

update agg_time_dimension example #6340

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions website/docs/docs/build/measures.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ semantic_models:
description: A record of every transaction that takes place. Carts are considered multiple transactions for each SKU.
model: ref('schema.transactions')
defaults:
agg_time_dimension: metric_time
agg_time_dimension: transaction_date

# --- entities ---
entities:
Expand Down Expand Up @@ -167,7 +167,7 @@ semantic_models:

# --- dimensions ---
dimensions:
- name: metric_time
- name: transaction_date
type: time
expr: date_trunc('day', ts) # expr refers to underlying column ts
type_params:
Expand Down Expand Up @@ -204,15 +204,15 @@ semantic_models:
description: A subscription table with one row per date for each active user and their subscription plans.
model: ref('your_schema.subscription_table')
defaults:
agg_time_dimension: metric_time
agg_time_dimension: subscription_date

entities:
- name: user_id
type: foreign
primary_entity: subscription_table

dimensions:
- name: metric_time
- name: subscription_date
type: time
expr: date_transaction
type_params:
Expand Down
Loading