From c0582557b7e4af8d2240b36fdcf7b6028dd7c63e Mon Sep 17 00:00:00 2001 From: Sam Debruyn Date: Tue, 23 Sep 2025 16:41:46 +0200 Subject: [PATCH] replace SQL syntax comments with Jinja comments --- .../models/microbatch_transaction_base.sql | 2 +- macros/upload_results/get_column_name_lists.sql | 2 +- models/dim_dbt__current_models.sql | 14 +++++++------- models/sources/exposures.sql | 2 +- models/sources/invocations.sql | 2 +- models/sources/model_executions.sql | 2 +- models/sources/models.sql | 2 +- models/sources/seed_executions.sql | 2 +- models/sources/seeds.sql | 2 +- models/sources/snapshot_executions.sql | 2 +- models/sources/snapshots.sql | 2 +- models/sources/sources.sql | 2 +- models/sources/test_executions.sql | 2 +- models/sources/tests.sql | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/integration_test_project/models/microbatch_transaction_base.sql b/integration_test_project/models/microbatch_transaction_base.sql index d4cdc055..31a67a19 100644 --- a/integration_test_project/models/microbatch_transaction_base.sql +++ b/integration_test_project/models/microbatch_transaction_base.sql @@ -33,7 +33,7 @@ with from mb_transactions ) - /* do this to prevent and db errors in case we can't self reference ...*/ + {# do this to prevent and db errors in case we can't self reference ...#} , transaction_time_today as ( select transaction_id, diff --git a/macros/upload_results/get_column_name_lists.sql b/macros/upload_results/get_column_name_lists.sql index 707e0c2c..29acb2ff 100644 --- a/macros/upload_results/get_column_name_lists.sql +++ b/macros/upload_results/get_column_name_lists.sql @@ -229,7 +229,7 @@ {% else %} - /* No column list available */ + {# No column list available #} {% endif %} {%- endmacro %} diff --git a/models/dim_dbt__current_models.sql b/models/dim_dbt__current_models.sql index 4e6ceb1b..27273cbb 100644 --- a/models/dim_dbt__current_models.sql +++ b/models/dim_dbt__current_models.sql @@ -3,15 +3,15 @@ with model_executions as (select * from {{ ref("stg_dbt__model_executions") }}), latest_models as ( - /* Retrieves the models present in the most recent run */ + {# Retrieves the models present in the most recent run #} select * from base where run_started_at = (select max(run_started_at) from base) ), latest_models_runs as ( - /* Retreives all successful run information for the models present in the most - recent run and ranks them based on query completion time */ + {# Retreives all successful run information for the models present in the most + recent run and ranks them based on query completion time #} select model_executions.node_id, model_executions.was_full_refresh, @@ -19,14 +19,14 @@ with model_executions.total_node_runtime, model_executions.rows_affected {% if target.type == "bigquery" %}, model_executions.bytes_processed {% endif %}, - /* Row number by refresh and node ID */ + {# Row number by refresh and node ID #} row_number() over ( partition by latest_models.node_id, model_executions.was_full_refresh - order by model_executions.query_completed_at desc /* most recent ranked first */ + order by model_executions.query_completed_at desc {# most recent ranked first #} ) as run_idx, - /* Row number by node ID */ + {# Row number by node ID #} row_number() over ( - partition by latest_models.node_id order by model_executions.query_completed_at desc /* most recent ranked first */ + partition by latest_models.node_id order by model_executions.query_completed_at desc {# most recent ranked first #} ) as run_idx_id_only from model_executions inner join latest_models on model_executions.node_id = latest_models.node_id diff --git a/models/sources/exposures.sql b/models/sources/exposures.sql index 6d593bcf..330d0e74 100644 --- a/models/sources/exposures.sql +++ b/models/sources/exposures.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as ( diff --git a/models/sources/invocations.sql b/models/sources/invocations.sql index d92c8bfb..77b0dc4e 100644 --- a/models/sources/invocations.sql +++ b/models/sources/invocations.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as ( diff --git a/models/sources/model_executions.sql b/models/sources/model_executions.sql index 5710affd..ac0dbaaa 100644 --- a/models/sources/model_executions.sql +++ b/models/sources/model_executions.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/models.sql b/models/sources/models.sql index 7ac8ee84..c9cf09e4 100644 --- a/models/sources/models.sql +++ b/models/sources/models.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/seed_executions.sql b/models/sources/seed_executions.sql index 95a750e6..c4440b58 100644 --- a/models/sources/seed_executions.sql +++ b/models/sources/seed_executions.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/seeds.sql b/models/sources/seeds.sql index 882c661a..5126ab21 100644 --- a/models/sources/seeds.sql +++ b/models/sources/seeds.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/snapshot_executions.sql b/models/sources/snapshot_executions.sql index 95a750e6..c4440b58 100644 --- a/models/sources/snapshot_executions.sql +++ b/models/sources/snapshot_executions.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/snapshots.sql b/models/sources/snapshots.sql index 77061731..d4ebcf77 100644 --- a/models/sources/snapshots.sql +++ b/models/sources/snapshots.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/sources.sql b/models/sources/sources.sql index 91c8d1d3..4f851352 100644 --- a/models/sources/sources.sql +++ b/models/sources/sources.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (select 1 as foo) select diff --git a/models/sources/test_executions.sql b/models/sources/test_executions.sql index c7d59121..ec5fd934 100644 --- a/models/sources/test_executions.sql +++ b/models/sources/test_executions.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as ( diff --git a/models/sources/tests.sql b/models/sources/tests.sql index d46ed1dc..1645d021 100644 --- a/models/sources/tests.sql +++ b/models/sources/tests.sql @@ -1,4 +1,4 @@ -/* Bigquery won't let us `where` without `from` so we use this workaround */ +{# Bigquery won't let us `where` without `from` so we use this workaround #} with dummy_cte as (