Optionally specify the database type of columns in a seed, by providing a dictionary where the keys are the column names, and the values are a valid datatype (this varies across databases).
Without specifying this, dbt will infer the datatype based on the column values in your seed file.
Specify column types in your
Or (as of v0.21):
- name: country_codes
If you have previously run
dbt seed, you'll need to run
dbt seed --full-refresh for the changes to take effect.
Note that you will need to use the fully directory path of a seed when configuring
column_types. For example, for a seed file at
seeds/marketing/utm_mappings.csv, you will need to configure it like so:
Use a varchar column type to preserve leading zeros in a zipcode
(Note: preservation of leading zeros works for v0.16.0 onwards)
jaffle_shop: # you must include the project name
Use this configuration only when required, i.e. when the type inference is not working as expected. Otherwise you can omit this configuration.