Skip to content

Commit

Permalink
Adjust schema name generation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpannek committed Feb 18, 2025
1 parent 11ab3ec commit 82a7bbf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ limitations under the License.*/
else target.root_path -%}
{%- set custom_schema_name = custom_schema_name if not is_datalake_node(node)
else node.config.root_path -%}
{%- set custom_schema_name = append_schema(custom_schema_name or default_schema, node.config.schema)
if node.config.materialized == 'table' else custom_schema_name -%}
{{ generate_schema_name_impl(default_schema, custom_schema_name, node) }}
{%- endmacro %}

{% macro append_schema(base_path, subfolder) -%}
{{ base_path if subfolder is none else subfolder if base_path in [none, 'no_schema'] else base_path ~ '.' ~ subfolder }}
{%- endmacro %}

{% macro generate_schema_name_impl(default_schema, custom_schema_name=none, node=none) -%}
{%- if custom_schema_name is none -%}

Expand Down

0 comments on commit 82a7bbf

Please sign in to comment.