Skip to content

[BUG] column_list null in unique_combination_of_columns #1011

@paulleblond

Description

@paulleblond

Describe the bug
DBT Fusion reports an error attempting to compile with the unique_combination_of_columns test and the quote_columns argument set to true. This code compiles correctly in the latest version of DBT Cloud.

error: dbt1501: Failed to render SQL unknown method: none has no method named append
(in target\generic_tests\unique_combination_of_columns__0d5ec3e41a387f7d06bfb53631f828b7.sql:1:1)
(in dbt_packages\dbt_utils\macros\generic_tests\unique_combination_of_columns.sql:2:29)
(in dbt_packages\dbt_utils\macros\generic_tests\unique_combination_of_columns.sql:12:45)
--> target\generic_tests\unique_combination_of_columns__0d5ec3e41a387f7d06bfb53631f828b7.sql:1:1

What version of dbt Fusion is this bug in? (find out by running dbt --version)
2.0.0-preview.63

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce
Build a model with the following YML. The quote_columns is required to cause the error.

  - name: MODEL_NAME
    constraints:
      - type: primary_key
        columns: [columna, columnb]
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - columna
              - columnb
            quote_columns: true

Expected behavior
Expect the code to compile without error.

Screenshots
N/A

Operating System and CPU Type (please complete the following information):

  • Windows
  • X86

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions