forked from dbt-labs/jaffle-shop-mesh-finance
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install reusable macros from jaffle_utils
- Loading branch information
Showing
3 changed files
with
10 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,3 @@ | ||
{% macro generate_schema_name(custom_schema_name, node) %} | ||
|
||
{% set default_schema = target.schema %} | ||
|
||
{# seeds go in a global `raw` schema #} | ||
{% if node.resource_type == 'seed' %} | ||
{{ custom_schema_name | trim }} | ||
|
||
{# non-specified schemas go to the default target schema #} | ||
{% elif custom_schema_name is none %} | ||
{{ default_schema }} | ||
|
||
|
||
{# specified custom schema names go to the schema name prepended with the the default schema name in prod (as this is an example project we want the schemas clearly labeled) #} | ||
{% elif target.name == 'prod' %} | ||
{{ default_schema }}_{{ custom_schema_name | trim }} | ||
|
||
{# specified custom schemas go to the default target schema for non-prod targets #} | ||
{% else %} | ||
{{ default_schema }} | ||
{% endif %} | ||
|
||
{% endmacro %} | ||
{% macro generate_schema_name(custom_schema_name, node) -%} | ||
{{ return(jaffle_utils.generate_schema_name(custom_schema_name, node)) }} | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
packages: | ||
- private: dbt-labs/jaffle-shop-mesh-platform-redshift | ||
revision: d0aff8c7b4089260be307a8fc2cd9011ab5a80e3 | ||
subdirectory: jaffle_utils | ||
- package: dbt-labs/dbt_utils | ||
version: 1.1.1 | ||
sha1_hash: a158c48c59c2bb7d729d2a4e215aabe5bb4f3353 | ||
sha1_hash: ee93461f4868b20836fc0eefbe2f5fbbbd4d71eb |