Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.

[Feature] Add support for detecting primary keys based on DBT contracted constraints or custom DBT PK tests #880

@ttusing

Description

@ttusing

Is your feature request related to a problem? Please describe.
In order to get data-diff setup with my DBT installation, it needs to know the primary keys. I have already defined my primary keys in my project using custom tests (in my case, dbt-constraints.primary_key from Snowflake Labs). I would like to use this definition instead of having to add the meta property to my YML files.

For my contracted models, I'dl like to use the constraints property.

Describe the solution you'd like
I would like to modify this section of code to check for constraints. I would also like to have it check the dbt_project.yml for a config that shows manually configured custom tests.

Describe alternatives you've considered
Add the meta element to all of my tables and keep them in sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions