-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-2612] [Feature] Add Contract to Seeds #7742
Comments
Thanks for raising this proposal @sanromeo ! Is there something about dbt model contracts that you are hoping for dbt seeds that wouldn't be covered by using |
@dbeatty10, thanks for your answer! I hadn't noticed that I needed to specify data_type when using the contract. Now, it works well when I set data_type in the definition for seeds, as I've written below: seeds:
- name: seed_name
config:
schema: seed_schema
tags: seed
column_types:
seed_id: int
seed_name: varchar(255)
contract:
enforced: true
columns:
- name: seed_id
data_type: integer
- name: seed_name
data_type: varchar It works with
I will be more attentive next time, thank you for your help! 🔥 ❤️ |
You are very welcome @sanromeo ! 🔥 ❤️ 🙌 I'm going to close this, but please reach out if there's any other follow-up needed here. |
Is this your first time submitting a feature request?
Describe the feature
The proposed feature aims to enhance the functionality of Contract released in dbt Core 1.5 by introducing contracts to seeds. This feature will allow users to define contracts for SEED data, ensuring that the data adheres to specific rules or conditions before it is loaded into the database.
The implementation of this feature will involve adding a new contract attribute to the seed configuration in the dbt project file. Users will be able to define their contracts using this attribute, and dbt will validate the seed data against these contracts during the seed operation.
Describe alternatives you've considered
Now that config returns error:
Who will this benefit?
Same
contract
functionality as we have for models nowAre you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: