-
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-2273] [Feature] Allowing ref
(or similar) for analysis files
#7127
Comments
ref
(or similar) for analysis filesref
(or similar) for analysis files
Thanks for raising this idea @friendofasquid ! Follow-up questionSupposing it is possible to reference an analysis file like Another alternativeAdded another idea to the bottom to your list of alternatives:
|
In reverse etl tools we want to use analysis (specific subsets of data) to be uploaded into different systems. Making analysis "refeable" would allows us to document exposures easily. model -> analysis -> exposure |
As this issue points out, one big difference between Additional differences (that are not relevent for this discussion per se):
SummaryAfter playing around a bit and researching the history of Whether or not we ultimately go that direction, it appears to me like the desired functionality is already effectively possible today, and it isn't too hard to convert an existing project to get the behavior akin to the proposed feature. If you haven't already done something similar, wanna give the instructions below a shot and provide feedback on what you do/don't like about it? An approach that works today@friendofasquid mentioned the alternative of moving analysis to an ephemeral model so it can be used in a Playing around a bit, it appears relatively simple to upgrade all your analyses so they can be ref'd:
DifferencesThe most crucial differences are that the logic in these files can now be used in a Two other differences that I'm seeing when converting
Other differences are surely present within the manifest at ExampleThanks for your use-case @NumberPiOso ! I've got an example repo here with step-by-step instructions of converting everything within an The final result shows the exposure depending on DetailsSuppose you have a name: "my_dbt_project"
version: "1.0.0"
config-version: 2
profile: "sandcastle-duckdb" Then you add this to the end of models:
my_dbt_project:
refable_analyses:
materialized: ephemeral And finally you move & rename your Note: if you previously had an Now each analysis can be referenced within an exposure like this:
version: 2
exposures:
- name: my_even_dashboard
description: My dashboard
type: dashboard
owner:
name: Somebody Somewhere
email: [email protected]
depends_on:
- ref('my_even_ids')" Interested to hear your feedback! |
Thanks for outlining the pros/cons of the alternative. After reviewing it some time I agree with this idea. Thank you for taking the time to provide an overview of the pros and cons of the alternative. After considering your proposal, I agree that it would be beneficial for queries related to The For my specific use case, I will try to document the models in a special way to prevent their usage instead (such as changing the colors in UI to look like an exposure instead of a model) or marking this with a special tag. Thank you once again for your time and effort in presenting your proposal. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Is this your first time submitting a feature request?
Describe the feature
Sometimes, we want to layer one analysis on top of another. In that case, it makes sense to allow a reference to a model file, essentially treating them like an ephemeral materialization.
Describe alternatives you've considered
Who will this benefit?
Anyone who uses analysis folder within dbt.
Are you interested in contributing this feature?
No
Anything else?
No response
The text was updated successfully, but these errors were encountered: