generate_schema_name handling. #268
Replies: 3 comments 2 replies
-
Hey @jaredvivints! I don't think you'll need to edit the I think it should look something like this...
|
Beta Was this translation helpful? Give feedback.
-
This is happening to me as well. I set the schema to
Partial output:
|
Beta Was this translation helpful? Give feedback.
-
It seems like it's using the default target name in the profiles.yaml and prepending that to the schema. Anyone know how to set the target just for the package? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've got a situation where I can't add the results of this package to a custom schema in Snowflake. We're using generate_schema_name to push custom folders into specific schemas. I for the life of me can't figure out how to make this work wanting the dbt_artifacts objects to go into our src_dbt_artifact schema.
Here is our generate_schema_name
{% macro generate_schema_name(custom_schema_name, node) -%}
{%- endmacro %}
Here is our dbt_project.yml config with the models block.
models:
dp_dbt:
dbt_artifacts:
+database: "{{ target.name + '_DB' }}" # optional, default is your target database
+schema: src_dbt_artifact # optional, default is your target schema
staging:
+database: "{{ target.name + '_DB' }}" # optional, default is your target database
+schema: src_dbt_artifact # optional, default is your target schema
sources:
+database: "{{ target.name + '_DB' }}" # optional, default is your target database
+schema: src_dbt_artifact # optional, default is your target schema
Would love any thoughts. I know the docs say "Be aware of any impact that generate_database_name and generate_schema_name macros may have on the final database/schema."
I'm just wondering how to handle this scenario.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions