Skip to content

Malformed having clause when quoting (it doesn't quote) #108

@fharrell-tfin

Description

@fharrell-tfin

This

        tests:
          - dbt_constraints.primary_key:
              arguments:
                column_names:
                  - id
                  - MTLN_CDC_LAST_COMMIT_TIMESTAMP
                  - MTLN_CDC_SEQUENCE_NUMBER
                quote_columns: True

Generates this code. Notice the column names:

    select
        "id", "MTLN_CDC_LAST_COMMIT_TIMESTAMP", "MTLN_CDC_SEQUENCE_NUMBER", count(*) as row_count
    from table1
    group by "id", "MTLN_CDC_LAST_COMMIT_TIMESTAMP", "MTLN_CDC_SEQUENCE_NUMBER"
    having count(*) > 1
        or id is null
        or MTLN_CDC_LAST_COMMIT_TIMESTAMP is null
        or MTLN_CDC_SEQUENCE_NUMBER is null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions