Skip to content

Conversation

@katieclaiborne-duet
Copy link
Contributor

@katieclaiborne-duet katieclaiborne-duet commented Oct 29, 2025

resolves #969

Problem

The documentation for dbt-audit-helper's compare and classify macros suggests using dbt_utils.get_filtered_columns_in_relation to pass in long column lists for comparison. However, doing so results in the compilation error below.

(venv) katieclaiborne@Mac dbt % dbt compile -s compare_and_classify_relation_rows -t main
19:18:48  Running with dbt=1.9.8
19:18:49  Registered adapter: bigquery=1.9.2
19:18:50  Encountered an error:
Compilation Error in analysis compare_and_classify_query_results (analyses/audit_helper/compare_and_classify_query_results.sql)
  can only concatenate list (not "str") to list
  
  > in macro compare_and_classify_query_results (macros/compare_and_classify_query_results.sql)
  > called by analysis compare_and_classify_query_results (analyses/audit_helper/compare_and_classify_query_results.sql)

Solution

As suggested in #969, I've updated the return type in parsing mode from string to list, so that the type is consistent across modes.

Checklist

  • This code is associated with an issue which has been triaged and accepted for development.
  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the README.md (if applicable)

@katieclaiborne-duet katieclaiborne-duet requested a review from a team as a code owner October 29, 2025 19:09
@katieclaiborne-duet
Copy link
Contributor Author

Sorry to bother, but could I ask for a review?

@b-per b-per merged commit 17b4750 into dbt-labs:main Nov 5, 2025
5 of 6 checks passed
@katieclaiborne-duet katieclaiborne-duet deleted the kc/make-get-filtered-columns-return-type-consistent branch November 5, 2025 14:15
@katieclaiborne-duet
Copy link
Contributor Author

Thank you, Benoit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbt_utils.get_filtered_columns_in_relation has inconsistent type between parsing and runtime

2 participants