Created
May 5, 2022 16:23
-
-
Save Victoriapm/3a390e40f8850cf7aa1442c518c8e809 to your computer and use it in GitHub Desktop.
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
{% macro generate_schema_name(custom_schema_name, node) -%} | |
{%- set default_schema = target.schema -%} | |
{# checks that no schema was predefined in project.yml or config | |
or we are in the development environment #} | |
{%- if custom_schema_name is none or target.name =='default' -%} | |
{{ default_schema }} | |
{%- else -%} | |
{# we are in production, use custom schema name from project #} | |
{{ custom_schema_name | trim }} | |
{%- endif -%} | |
{%- endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment