Skip to content

Commit e878bc5

Browse files
committed
Release 0.11.2
Hotfix for src_eff
2 parents 39115fe + 341eb2b commit e878bc5

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

macros/tables/postgres/sat.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ unique_source_records AS (
8989
) OVER (
9090
{%- endif %}
9191
PARTITION BY {{ automate_dv.prefix([src_pk], 'sd', alias_target='source') }}
92-
{%- if automate_dv.is_something([src_eff]) %}
92+
{%- if automate_dv.is_something(src_eff) %}
9393
ORDER BY {{ automate_dv.prefix([src_ldts], 'sd', alias_target='source') }} ASC,
9494
{{ automate_dv.prefix([src_eff], 'sd', alias_target='source') }} ASC
9595
{%- else %}

macros/tables/snowflake/sat.sql

+15-10
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,21 @@ valid_stg AS (
8484

8585
{%- endif %}
8686

87-
{%- set is_incremental = automate_dv.is_any_incremental() %}
88-
{%- set use_valid_stg = is_incremental and apply_source_filter %}
89-
{%- set source_table = 'valid_stg AS sd' if use_valid_stg else 'source_data AS sd' %}
90-
{%- set hashdiff_alias = automate_dv.prefix([src_hashdiff], 'sd', alias_target='source') %}
91-
{%- set lag_default = automate_dv.cast_binary('FFFFFFFF', quote=true) %}
92-
{%- set partition_by = automate_dv.prefix([src_pk], 'sd', alias_target='source') %}
93-
{%- set order_by = automate_dv.prefix([src_ldts], 'sd', alias_target='source') %}
94-
{%- set order_by_eff = automate_dv.prefix([src_eff], 'sd', alias_target='source') %}
95-
{%- set is_bigquery = target.type == 'bigquery' %}
96-
{%- set use_eff = automate_dv.is_something([src_eff]) %}
87+
{%- set is_incremental = automate_dv.is_any_incremental() -%}
88+
{%- set use_valid_stg = is_incremental and apply_source_filter -%}
89+
{%- set source_table = 'valid_stg AS sd' if use_valid_stg else 'source_data AS sd' -%}
90+
{%- set hashdiff_alias = automate_dv.prefix([src_hashdiff], 'sd', alias_target='source') -%}
91+
{%- set lag_default = automate_dv.cast_binary('FFFFFFFF', quote=true) -%}
92+
{%- set partition_by = automate_dv.prefix([src_pk], 'sd', alias_target='source') -%}
93+
{%- set is_bigquery = target.type == 'bigquery' -%}
94+
{%- set order_by = automate_dv.prefix([src_ldts], 'sd', alias_target='source') -%}
95+
96+
{%- set use_eff = automate_dv.is_something(src_eff) -%}
97+
98+
{%- if use_eff -%}
99+
{%- set order_by_eff = automate_dv.prefix([src_eff], 'sd', alias_target='source') -%}
100+
{%- endif -%}
101+
97102
{#- BigQuery does not support a 3-arg LAG() where the third arg is an expression, it must be a constant. Workaround below #}
98103

99104
unique_source_records AS (

0 commit comments

Comments
 (0)