fix: dbt schema
This commit is contained in:
@@ -18,7 +18,10 @@ models:
|
|||||||
data_platform:
|
data_platform:
|
||||||
staging:
|
staging:
|
||||||
+materialized: view
|
+materialized: view
|
||||||
|
+schema: staging
|
||||||
intermediate:
|
intermediate:
|
||||||
+materialized: view
|
+materialized: view
|
||||||
|
+schema: intermediate
|
||||||
marts:
|
marts:
|
||||||
+materialized: table
|
+materialized: table
|
||||||
|
+schema: marts
|
||||||
|
|||||||
7
dbt/macros/generate_schema_name.sql
Normal file
7
dbt/macros/generate_schema_name.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{% macro generate_schema_name(custom_schema_name, node) -%}
|
||||||
|
{%- if custom_schema_name is none -%}
|
||||||
|
{{ default_schema }}
|
||||||
|
{%- else -%}
|
||||||
|
{{ custom_schema_name | trim }}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endmacro %}
|
||||||
@@ -8,5 +8,5 @@ data_platform:
|
|||||||
user: "{{ env_var('POSTGRES_USER') }}"
|
user: "{{ env_var('POSTGRES_USER') }}"
|
||||||
password: "{{ env_var('POSTGRES_PASSWORD') }}"
|
password: "{{ env_var('POSTGRES_PASSWORD') }}"
|
||||||
dbname: "{{ env_var('POSTGRES_DB') }}"
|
dbname: "{{ env_var('POSTGRES_DB') }}"
|
||||||
schema: staging
|
schema: public
|
||||||
threads: 4
|
threads: 4
|
||||||
|
|||||||
Reference in New Issue
Block a user