Repository navigation
Add compiled_sql and relation_name(audit_table_name) in Test_Executions, stg_dbt__test_executions, fct_dbt__test_executions - #539
Merged
mtcarlone merged 15 commits intoNov 6, 2026
Conversation
Contributor
Author
|
Hi Team, This is my first contribution, I went through contribution.md. |
Contributor
Author
|
can you please review this PR. |
Contributor
Author
|
please review this additional columns if they are helpful. |
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
sagark246
had a problem deploying
to
Approve Integration Tests
February 5, 2026 06:43 — with
GitHub Actions
Failure
Contributor
|
@sagark246 can you merge main back into this and I'll ready it for a release in the next few weeks. CI has been updated to be more reliable |
The PR added the two columns only to the BigQuery upload macro, so the Default, Snowflake, Postgres/DuckDB, SQL Server and Trino inserts sent 13 values into 15 columns and the on-run-end hook failed on those adapters. Append both last in every override, as plain strings or real nulls. compiled_sql is varchar(max) on SQL Server (new type_long_string helper), where the string type is varchar(8000) and a longer test would fail the insert. dbt_artifacts_exclude_compiled_sql leaves it out. test_executions gets a 100-row default batch on BigQuery and Trino, since compiled SQL makes each row larger.
A unique test now stores failures, and long_compiled_test compiles to over 9,000 characters with a quote, a backslash and newlines. The new singular test checks the previous build's rows: compiled_sql is present and whole for every test that ran, and audit_table_name is set only for tests that store failures.
Fusion leaves node.compiled_code empty on run results and sets result.compiled_code instead, so compiled_sql was null for every test. Fall back to it; on dbt Core it's undefined and node.compiled_code wins.
mtcarlone
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Update type - breaking / non-breaking
What does this solve?
Current Scenario: We don't have these two columns in the test_executions model.
Columns:
below is the snippet from results.json, highlighting the missing column from

Outstanding questions
bigquery__get_test_executions_dml_sql or should i fix default__get_test_executions_dml_sql
What databases have you tested with?