Skip to content

Commit

Permalink
Merge pull request #242 from ScalefreeCOM/fix-hub-key-renaming-for-si…
Browse files Browse the repository at this point in the history
…ngle-source-hubs

fix hub key renaming if there are different namings for bk and hkey
  • Loading branch information
tkirschke authored Sep 2, 2024
2 parents e09b653 + 5a95cd0 commit e7c78ea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions macros/tables/bigquery/hub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ WITH
SELECT
{{ hk_column }} AS {{ hashkey }},
{% for bk in source_model['bk_columns'] -%}
{{ bk }},
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down Expand Up @@ -188,7 +188,7 @@ source_new_union AS (
{{ hashkey }},

{% for bk in source_model['bk_columns'] -%}
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down
4 changes: 2 additions & 2 deletions macros/tables/exasol/hub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ WITH
SELECT
{{ hk_column }} AS {{ hashkey }},
{% for bk in source_model['bk_columns'] -%}
{{ bk }},
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down Expand Up @@ -186,7 +186,7 @@ source_new_union AS (
{{ hashkey }},

{% for bk in source_model['bk_columns'] -%}
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down
4 changes: 2 additions & 2 deletions macros/tables/postgres/hub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ WITH
SELECT
{{ hk_column }} AS {{ hashkey }},
{% for bk in source_model['bk_columns'] -%}
{{ bk }},
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down Expand Up @@ -188,7 +188,7 @@ source_new_union AS (
{{ hashkey }},

{% for bk in source_model['bk_columns'] -%}
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down
4 changes: 2 additions & 2 deletions macros/tables/redshift/hub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ WITH
SELECT
{{ hk_column }} AS {{ hashkey }},
{% for bk in source_model['bk_columns'] -%}
{{ bk }},
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down Expand Up @@ -188,7 +188,7 @@ source_new_union AS (
{{ hashkey }},

{% for bk in source_model['bk_columns'] -%}
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down
4 changes: 2 additions & 2 deletions macros/tables/synapse/hub.sql
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ WITH
SELECT
{{ hk_column }} AS {{ hashkey }},
{% for bk in source_model['bk_columns'] -%}
{{ bk }},
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down Expand Up @@ -188,7 +188,7 @@ source_new_union AS (
{{ hashkey }},

{% for bk in source_model['bk_columns'] -%}
{{ bk }} AS {{ business_keys[loop.index - 1] }},
{{ business_keys[loop.index - 1] }},
{% endfor -%}

{{ src_ldts }},
Expand Down

0 comments on commit e7c78ea

Please sign in to comment.