Skip to content

Commit

Permalink
Fix inline comments (--) on the last line of an incremental model (pa…
Browse files Browse the repository at this point in the history
…rtition replacement) (#991)

* Fix inline comments on the last line
* Add changes
* Add test for comment

---------

Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
  • Loading branch information
tnk-ysk and mikealfare authored Nov 8, 2023
1 parent 64e042a commit bf30b66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231105-125740.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix inline comments (--) on the last line of an incremental model
time: 2023-11-05T12:57:40.289399+09:00
custom:
Author: tnk-ysk
Issue: "896"
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
{{ wrap_with_time_ingestion_partitioning_sql(partition_by, sql, True) }}
{%- else -%}
{{sql}}
{%- endif -%}
{%- endif %}

)
{%- endset -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
{% if is_incremental() %}
where date_day in ({{ config.get("partitions") | join(",") }})
{% endif %}
-- Test comment to prevent recurrence of https://github.com/dbt-labs/dbt-bigquery/issues/896
""".lstrip()

overwrite_range_sql = """
Expand Down

0 comments on commit bf30b66

Please sign in to comment.