Skip to content

Commit 8a73818

Browse files
authored
Merge pull request #289 from ScalefreeCOM/tkirschke-patch-2
Fixed PARTION BY Clause in Sat v0 for Fabric
2 parents 44a2c91 + dbf902e commit 8a73818

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

macros/tables/fabric/sat_v0.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ latest_entries_in_sat_prep AS (
6363
SELECT
6464
tgt.{{ parent_hashkey }},
6565
tgt.{{ ns.hdiff_alias }},
66-
ROW_NUMBER() OVER(PARTITION BY tgt.{{ parent_hashkey|lower }} ORDER BY tgt.{{ src_ldts }} DESC) as rn
66+
ROW_NUMBER() OVER(PARTITION BY tgt.{{ parent_hashkey }} ORDER BY tgt.{{ src_ldts }} DESC) as rn
6767
FROM {{ this }} tgt
6868
INNER JOIN distinct_incoming_hashkeys src
6969
ON tgt.{{ parent_hashkey }} = src.{{ parent_hashkey }}
@@ -91,7 +91,7 @@ deduplicated_numbered_source_prep AS (
9191
{{ parent_hashkey }},
9292
{{ ns.hdiff_alias }},
9393
{{ datavault4dbt.print_list(source_cols) }}
94-
, LAG({{ ns.hdiff_alias }}) OVER(PARTITION BY {{ parent_hashkey|lower }} ORDER BY {{ src_ldts }}) as prev_hashdiff
94+
, LAG({{ ns.hdiff_alias }}) OVER(PARTITION BY {{ parent_hashkey }} ORDER BY {{ src_ldts }}) as prev_hashdiff
9595
FROM source_data
9696

9797
),
@@ -142,4 +142,4 @@ records_to_insert AS (
142142

143143
SELECT * FROM records_to_insert
144144

145-
{%- endmacro -%}
145+
{%- endmacro -%}

0 commit comments

Comments
 (0)