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
(Caveat: not sure if this functionality already exists!)
I would like to be able to write the mock_model_relation to a separate schema to the model.
Currently, the model_dmt_{timestamp} models are showing up in our production dataset (alongside model) which are being surfaced in our BI tool. I'd like to put these into a separate schema. Happy to use the custom_schema_name with the generate_schema_name macro if this is possible.
I've done this with the seed files in dbt_project.yml using the seeds/dmt/schema config in my own project.
Overriding the schemas for models/dbt_datamocktool in dbt_project.yml (doesn't seem to work as it's picking up the schema from the model itself which is defined in my project)
Overriding generate_schema_name to check for any models with dmt in the name (again I think this has the same issue as above as it's picking up the schema before adding dmt + suffix)
My final option here is to have a Python script run after each run of dmt to delete the tables.
Additional context
Working on BigQuery
Are you interested in contributing this feature?
Happy to make the change given some pointers.
The text was updated successfully, but these errors were encountered:
Describe the feature
(Caveat: not sure if this functionality already exists!)
I would like to be able to write the
mock_model_relation
to a separate schema to themodel
.Currently, the
model_dmt_{timestamp}
models are showing up in our production dataset (alongsidemodel
) which are being surfaced in our BI tool. I'd like to put these into a separate schema. Happy to use thecustom_schema_name
with thegenerate_schema_name
macro if this is possible.I've done this with the seed files in
dbt_project.yml
using theseeds/dmt/schema
config in my own project.Describe alternatives you've considered
Tried a few things:
default___get_model_to_mock
macro to replacemodel
withref("dmt_schema", model.name)
models/dbt_datamocktool
indbt_project.yml
(doesn't seem to work as it's picking up the schema from the model itself which is defined in my project)generate_schema_name
to check for any models withdmt
in the name (again I think this has the same issue as above as it's picking up the schema before adding dmt + suffix)My final option here is to have a Python script run after each run of dmt to delete the tables.
Additional context
Working on BigQuery
Are you interested in contributing this feature?
Happy to make the change given some pointers.
The text was updated successfully, but these errors were encountered: