Skip to content

Commit

Permalink
Fix return_limits_from_model
Browse files Browse the repository at this point in the history
  • Loading branch information
agnessnowplow committed Dec 11, 2024
1 parent 6571777 commit 683abae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ SELECT 'dummy_model_only_nulls', cast('9999-01-01 00:00:00.000' as {{ dbt.type_t
UNION ALL
SELECT 'dummy_model_standard', cast('2024-12-01 00:00:00.000' as {{ dbt.type_timestamp() }}) , cast('2024-12-02 00:00:00.000' as {{ dbt.type_timestamp() }})
UNION ALL
SELECT 'dummy_model_empty_with_lower_output_true', cast('1970-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('1970-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
SELECT 'dummy_model_empty_with_lower_output_true', cast('1999-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('1999-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
UNION ALL
SELECT 'dummy_model_empty_with_lower_output_false', cast('9999-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('9999-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
UNION ALL
SELECT 'dummy_model_only_nulls_with_lower_output_true', cast('1970-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('1970-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
SELECT 'dummy_model_only_nulls_with_lower_output_true', cast('1999-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('1999-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
UNION ALL
SELECT 'dummy_model_only_nulls_with_lower_output_false', cast('9999-01-01 00:00:00.000' as {{ dbt.type_timestamp() }}), cast('9999-01-02 00:00:00.000' as {{ dbt.type_timestamp() }})
UNION ALL
Expand Down
4 changes: 2 additions & 2 deletions macros/incrementalize/return_limits_from_model.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ You may obtain a copy of the Snowplow Personal and Academic License Version 1.0
{% do exceptions.warn("Snowplow Warning: No data in "~this~" for date range from variables, please modify your run variables to include data if this is not expected.") %}
{{ snowplow_utils.log_message("Snowplow Warning: *************") }}
{% if lower_output %}
{% set lower_limit = snowplow_utils.cast_to_tstamp('0000-01-01 00:00:00') %}
{% set upper_limit = snowplow_utils.cast_to_tstamp('0000-01-02 00:00:00') %}
{% set lower_limit = snowplow_utils.cast_to_tstamp('1999-01-01 00:00:00') %}
{% set upper_limit = snowplow_utils.cast_to_tstamp('1999-01-02 00:00:00') %}
{%- else -%}
{# Default behaviour for incrementalization. This allows for bigquery to still run the same way the other warehouses do, but also ensures no data is processed #}
{% set lower_limit = snowplow_utils.cast_to_tstamp('9999-01-01 00:00:00') %}
Expand Down

0 comments on commit 683abae

Please sign in to comment.