-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-3204] [implementation] Automate creation of metricflow_time_spine if the project defines semantic objects #8825
Comments
Originally posted by @dbeatty10 in #8319 (comment) |
@graciegoheen I guess this is low priority but is there an ETA for when this would happen? |
@Jstein77 is this still needed? |
This feature is completely independent from #7442, but linking it here because they are spiritually similar -- they would both create database objects (and/or dbt nodes) without the user explicitly defining and configuring them. |
@ChenyuLInx @MichelleArk @dbeatty10 I think we can close this issue. We updated the behavior so you can point at any date spine model in your project. It doesn't have to be called |
Housekeeping
Short description
From #8319
Currently, if the user defines semantic objects in their project, but not a model named metricflow_time_spine, we raise an error.
We should simply create the model automatically, if it is not found in the project, using the recommended definition.
Users should still have the ability to create themselves with a custom implementation if they so choose.
Acceptance criteria
Impact to Other Teams
semantic layer
Will backports be required?
no
Context
So there are two main concerns I believe:
Squaring partial parsing with generating a metricflow_time_spine model when one isn't specified
Auto-generating the metricflow_time_spine correctly given the any adapter
For Issue (1) there are four possible states
a. metricflow_time_spine was specified by the user and that's still the case
b. metricflow_time_spine was specified by the user and now isn't (and thus should be generated)
c. metricflow_time_spine wasn't specified by the user (and thus generated) and that's still the case
d. metricflow_time_spine wasn't specified by the user (and thus generated) but now it is specified by the user
I think the solution is at the end of parsing if there are semantic layer nodes and no metricflow_time_spine model we add one and mark it as auto generated. At the start of parsing if there is a saved manifest, we drop the metricflow_time_spine node if is marked as having been auto generated. This workflow makes the following happen in the corresponding cases.
a. the metricflow_time_spine is handled by the user specification
b. the user specifed metricflow_time_spine gets dropped during partial parsing, and then re-added via the auto-generation
c. the auto generated metricflow_time_spine gets dropped, and then re-added at the end
d. the auto generated metricflow_time_spine gets dropped, and then the user specified metricflow_time_spine gets added
For issue (2) I don't think we need a cross-database macro for date types, though it would be nice. Instead we could just use the same jinja template we use for the date_spine macro tests, were we do different calls to the macro based on the target data warehouse.
The text was updated successfully, but these errors were encountered: