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

[CT-2734] Add metricflow_time_spine to the semantic manifest. #7938

Closed
3 tasks done
Tracked by #7498
Jstein77 opened this issue Jun 23, 2023 · 9 comments · Fixed by #7996
Closed
3 tasks done
Tracked by #7498

[CT-2734] Add metricflow_time_spine to the semantic manifest. #7938

Jstein77 opened this issue Jun 23, 2023 · 9 comments · Fixed by #7996
Assignees
Labels
enhancement New feature or request semantic Issues related to the semantic layer

Comments

@Jstein77
Copy link

Jstein77 commented Jun 23, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

We need to create a time spine model in the users dbt project to support cumulative metrics (full context here: https://www.notion.so/dbtlabs/Time-spine-for-SL-Beta-7c10850fcaf44d47ba0cf23b0a03f4b4). This will be a model that is fully managed by dbt. The user shouldn't have to think about configuring this model or need to write a seperate semantic manifest config.

We should automatically add this model to the semantic manifest, even if there is no semantic model config, so metricflow can use it for constructing cumulative metrics.

Describe alternatives you've considered

The user would create a semantic manifest file manually. This feels like unnecessary friction for since this model is an internal MetricFlow model, and not something a user should have to think about configuring.

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@Jstein77 Jstein77 added enhancement New feature or request triage labels Jun 23, 2023
@github-actions github-actions bot changed the title Add metricflow_time_spine to the semantic manifest. [CT-2734] Add metricflow_time_spine to the semantic manifest. Jun 23, 2023
@dbeatty10 dbeatty10 removed the triage label Jun 23, 2023
@jtcohen6
Copy link
Contributor

I understand the current plan here is:

We should automatically add this model to the semantic manifest, even if there is no semantic model config, so metricflow can use it for constructing cumulative metrics.

Question: Should dbt automatically create this model in every project? Even projects that are not using the Semantic Layer (defining semantic models / metrics) at all?

@jtcohen6 jtcohen6 added the semantic Issues related to the semantic layer label Jun 26, 2023
@Jstein77
Copy link
Author

I love the idea of using similar logic for finding the latest versioned model. Thanks for surfacing that discussion!

Question: Should dbt automatically create this model in every project? Even projects that are not using the Semantic Layer (defining semantic models / metrics) at all?

I don't think we should create the time spine if the project doesn't have semantic models for two reasons:

  1. We're creating an extra table/view in the users warehouse that they don't need. It would be confusing to see this pop up if you're just using dbt for transformations.
  2. Although it's probably negligible, we're adding extra latency and compute to your project when we don't need to be.

Ideally we're smart enough to know if a project has semantic models, and only create the time spine table if they do.

@marcodamore
Copy link

@marcodamore
Copy link

@gshank gshank self-assigned this Jun 26, 2023
@gshank
Copy link
Contributor

gshank commented Jun 26, 2023

From the standup meeting what I gathered was that the first step was for users to create this model themselves, from documentation. Is that correct? Is there documentation of what that would look like?

@gshank
Copy link
Contributor

gshank commented Jun 27, 2023

Do we want the whole model stored in the SemanticManifest? Where? It's neither a semantic_model nor a metric... Or do we just want the relation name in config?

@gshank
Copy link
Contributor

gshank commented Jun 30, 2023

I have code in the attached pull request to check for the "metricflow_time_spine" model and put the information in the semantic manifest config. But that doesn't get the table created. Do we want to tell people to always run that model first? Add it as a "depends_on.nodes" to all of the semantic models?

We need some way to get the table actually created...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semantic Issues related to the semantic layer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants