Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit bf30b66

Browse files
tnk-yskmikealfare
andauthored
Fix inline comments (--) on the last line of an incremental model (partition replacement) (#991)
* Fix inline comments on the last line * Add changes * Add test for comment --------- Co-authored-by: Mike Alfare <[email protected]>
1 parent 64e042a commit bf30b66

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Fixes
2+
body: Fix inline comments (--) on the last line of an incremental model
3+
time: 2023-11-05T12:57:40.289399+09:00
4+
custom:
5+
Author: tnk-ysk
6+
Issue: "896"

dbt/include/bigquery/macros/materializations/incremental_strategy/insert_overwrite.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
{{ wrap_with_time_ingestion_partitioning_sql(partition_by, sql, True) }}
7171
{%- else -%}
7272
{{sql}}
73-
{%- endif -%}
73+
{%- endif %}
7474

7575
)
7676
{%- endset -%}

tests/functional/adapter/incremental/incremental_strategy_fixtures.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
{% if is_incremental() %}
307307
where date_day in ({{ config.get("partitions") | join(",") }})
308308
{% endif %}
309+
-- Test comment to prevent recurrence of https://github.com/dbt-labs/dbt-bigquery/issues/896
309310
""".lstrip()
310311

311312
overwrite_range_sql = """

0 commit comments

Comments
 (0)