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

clarifies mf timespine & creates mini guide #6836

Open
wants to merge 16 commits into
base: current
Choose a base branch
from

Conversation

mirnawong1
Copy link
Contributor

@mirnawong1 mirnawong1 commented Jan 28, 2025

this pr clarifies that that the MF timespine doc based on user feedback in community slack.

PR clarifies that:

  • a date table is needed
  • along with the time spine yaml config.
  • why its needed
  • creates a mini guide on how to create a new time spine table and yaml config

🚀 Deployment available! Here are the direct links to the updated files:

@mirnawong1 mirnawong1 requested a review from a team as a code owner January 28, 2025 13:02
Copy link

vercel bot commented Jan 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview Feb 7, 2025 6:12pm

@github-actions github-actions bot added size: large This change will more than a week to address and might require more than one person Docs team Authored by the Docs team @dbt Labs content Improvements or additions to content guides Knowledge best suited for Guides and removed size: large This change will more than a week to address and might require more than one person Docs team Authored by the Docs team @dbt Labs labels Jan 28, 2025

5. Double check that the results are correct and returning the expected data.

## Add additional granularities (optional)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought we could do this based on this example but when i tested it, it only returned date_day.


4. Validate the output by querying the generated table:
```bash
dbt sl query --metrics revenue --group-by metric_time__hour
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the ide doesn't support metric_time__hour -- is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or should i scrap this section?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think the IDE supports metric_time__hour, why do you say otherwise?

You could try
dbt sl list dimensions --metrics revenue

@github-actions github-actions bot added Docs team Authored by the Docs team @dbt Labs size: large This change will more than a week to address and might require more than one person labels Jan 28, 2025
website/docs/guides/mf-time-spine.md Outdated Show resolved Hide resolved
website/docs/guides/mf-time-spine.md Outdated Show resolved Hide resolved
website/docs/guides/mf-time-spine.md Outdated Show resolved Hide resolved
website/docs/guides/mf-time-spine.md Outdated Show resolved Hide resolved

4. Validate the output by querying the generated table:
```bash
dbt sl query --metrics revenue --group-by metric_time__hour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think the IDE supports metric_time__hour, why do you say otherwise?

You could try
dbt sl list dimensions --metrics revenue

@patkearns10
Copy link
Contributor

Should a mini guide include custom time spines / custom calendars?


## Run and test the time spine

For the time spine table you created, let's run it and validate the output.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patkearns10 , i think maybe lines 133-143 dont make sense. i probably should just start with 144, query dbt sl query --metrics revenue --group-by metric_time -- does that make sense to you in terms of how to test the .sql and yaml file work?
Screenshot 2025-02-07 at 17 23 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs guides Knowledge best suited for Guides size: large This change will more than a week to address and might require more than one person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants