Skip to content

[Bug] Unable to use contract enforcement if a column is a HLLSKETCH data type in Redshift #1593

@jhoang-movableink

Description

@jhoang-movableink

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Which packages are affected?

  • dbt-adapters
  • dbt-tests-adapter
  • dbt-athena
  • dbt-athena-community
  • dbt-bigquery
  • dbt-postgres
  • dbt-redshift
  • dbt-snowflake
  • dbt-spark

Current Behavior

Unable to create an HLLSKETCH column if enforced: true in a dbt contract.

Expected Behavior

With contract enforcement enabled, expect model to build appropriately.

Steps To Reproduce

Building a model similar to...

SELECT 
	hll_create_sketch(identifier)::HLLSKETCH AS sketch
FROM
	schema.raw_data
GROUP BY
	date

With a model column defined as...

models:
  - name: dbt_model
    description: example model
    config:
      tags:
        - example_tag
      contract:
        enforced: true
    columns:
      - name: sketch
        description: example description
        data_type: HLLSKETCH

Expect model to execute without any issues.

Relevant log output

00:13:02  Completed with 1 error, 0 partial successes, and 0 warnings:
00:13:02  
00:13:02  Failure in model dbt_model.sql)
00:13:02    2935 is not a valid RedshiftOID

Environment

- OS: MacOS 26.1
- Python: 3.11.9
- dbt-adapters: 1.22.5
- redshift: 1.10.2

Additional Context

Alternatively, if it's possible to disable data enforcement on a single column, this would also be acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage:productIn Product's queuetype:bugSomething isn't working as documented

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions