diff --git a/macros/generate_schema_name.sql b/macros/generate_schema_name.sql index 26de2c8..fb86fed 100644 --- a/macros/generate_schema_name.sql +++ b/macros/generate_schema_name.sql @@ -8,17 +8,13 @@ To understand better, check: */ {% macro generate_schema_name(custom_schema_name, node) -%} - {% macro generate_schema_name(custom_schema_name, node) -%} + {%- set default_schema = target.schema -%} + {%- set is_ci_execution = env_var("IS_CI_EXECUTION", "0") | int -%} + {%- set ci_schema_name = env_var("CI_SCHEMA_NAME", "ci_default") -%} - {%- set default_schema = target.schema -%} - {%- set is_ci_execution = env_var("IS_CI_EXECUTION", "0") | int -%} - {%- set ci_schema_name = env_var("CI_SCHEMA_NAME", "ci_default") -%} - - {%- if is_ci_execution == 1 -%} {{ ci_schema_name }} - {%- elif custom_schema_name is none -%} {{ default_schema }} - {%- else -%} {{ custom_schema_name | trim }} - {%- endif -%} - - {%- endmacro %} + {%- if is_ci_execution == 1 -%} {{ ci_schema_name }} + {%- elif custom_schema_name is none -%} {{ default_schema }} + {%- else -%} {{ custom_schema_name | trim }} + {%- endif -%} {%- endmacro %}