Skip to content

Commit

Permalink
cast
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Oct 11, 2024
1 parent c935ce7 commit d314de6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ select {{source_cols_csv}} from {{ source_relation }}
{%- set start_time = config.get("__dbt_internal_microbatch_event_time_start") -%}
{%- set end_time = config.get("__dbt_internal_microbatch_event_time_end") -%}
{%- if start_time -%}
{%- do incremental_predicates.append(event_time ~ " >= '" ~ start_time ~ "'") -%}
{%- do incremental_predicates.append("cast(" ~ event_time ~ " as TIMESTAMP) >= '" ~ start_time ~ "'") -%}
{%- endif -%}
{%- if end_time -%}
{%- do incremental_predicates.append(event_time ~ " < '" ~ end_time ~ "'") -%}
{%- do incremental_predicates.append("cast(" ~ event_time ~ " as TIMESTAMP) < '" ~ end_time ~ "'") -%}
{%- endif -%}
{%- do arg_dict.update({'incremental_predicates': incremental_predicates}) -%}
{{ return(get_replace_where_sql(arg_dict)) }}
Expand Down

0 comments on commit d314de6

Please sign in to comment.