You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our end models, we do not currently include foreign key IDs in the final CTE.
Currently, we use these FKs to join in information about their entities (i.e. subsidiaries, locations, vendors, departments, entity), which we bring into the end model's final CTE. This leaves information without an easy way to join back to the source entity from which the info came. Moreover, we don't bring in ALL the information available in these joins. Having the ID in there lets people grab more info than we are (but maybe we should bring in more fields by default as well?)
Describe alternatives you've considered
To get around this, I created passthrough columns that basically copy the foreign key ID fields and alias them so as to not cause duplicate column errors. Then, in a model in my own dbt project, I rename the the aliased FK field to its original name (since the FK has been excluded from our end models)
Is there an existing feature request for this?
Describe the Feature
In our end models, we do not currently include foreign key IDs in the final CTE.
Currently, we use these FKs to join in information about their entities (i.e. subsidiaries, locations, vendors, departments, entity), which we bring into the end model's final CTE. This leaves information without an easy way to join back to the source entity from which the info came. Moreover, we don't bring in ALL the information available in these joins. Having the ID in there lets people grab more info than we are (but maybe we should bring in more fields by default as well?)
Describe alternatives you've considered
To get around this, I created passthrough columns that basically copy the foreign key ID fields and alias them so as to not cause duplicate column errors. Then, in a model in my own dbt project, I rename the the aliased FK field to its original name (since the FK has been excluded from our end models)
the dbt_project.yml looks like
this is a messy and a lil annoying to do (but functional)
Are you interested in contributing this feature?
Anything else?
No response
The text was updated successfully, but these errors were encountered: