dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.59k stars 1.59k forks source link

Treate seeds like models #10435

Open RalfKow opened 1 month ago

RalfKow commented 1 month ago

Is this your first time submitting a feature request?

Describe the feature

I could use the same options to define a seed as I can with a model. f. E. If I define a model I can define all columns and its constrains.

models

version: 2

models:
  - name: user
    columns:
      - name: user_id
        data_type: varchar(16777216)
        constraints:
          - type: not_null
          - type: primary_key
      - name: usage_car_id
        data_type: number(38,0)

I could define seeds exactly the same

Seeds

seeds:
  - name: user
    columns:
      - name: user_id
        data_type: varchar(16777216)
        constraints:
          - type: not_null
          - type: primary_key
      - name: usage_car_id
        data_type: number(38,0)

Describe alternatives you've considered

I write custom markdown files to emulate the wished behaviour

Who will this benefit?

Everyone that uses seeds

Are you interested in contributing this feature?

No response

Anything else?

No response

dbeatty10 commented 1 month ago

Thanks for reaching out @RalfKow !

Are you hoping that seeds can have all the components of model contracts (enforced constraints, enforced data types, ability to create different versions, etc)?

Could you share an example of your custom markdown files to emulate your desired behaviour?

And could you also share more about how this would make a difference for your use-case(s)?