# Seed configurations

## Available configurations

### Seed-specific configurations

Resource-specific configurations are applicable to only one dbt resource type rather than multiple resource types. You can define these settings in the project file (`dbt_project.yml`), a property file (`models/properties.yml` for models, similarly for other resources), or within the resource’s file using the `{{ config() }}` macro.<br />

The following resource-specific configurations are only available to Seeds:

### Project file

dbt\_project.yml

```yml
seeds:
  <resource-path>:
    +quote_columns: true | false
    +column_types: {column_name: datatype}
    +delimiter: <string>
```

### Property file

seeds/properties.yml

```yaml

seeds:
  - name: [<seed-name>]
    config:
      quote_columns: true | false
      column_types: {column_name: datatype}
      delimiter: <string>
```

### General configurations

General configurations provide broader operational settings applicable across multiple resource types. Like resource-specific configurations, these can also be set in the project file, property files, or within resource-specific files.

### Project file

dbt\_project.yml

(Applies to dbt v1.9 and later)

```yaml
seeds:
  <resource-path>:
    +enabled: true | false
    +tags: <string> | [<string>]
    +pre-hook: <sql-statement> | [<sql-statement>]
    +post-hook: <sql-statement> | [<sql-statement>]
    +database: <string>
    +schema: <string>
    +alias: <string>
    +persist_docs: <dict>
    +full_refresh: <boolean>
    +meta: {<dictionary>}
    +grants: {<dictionary>}
    +event_time: my_time_field
```

### Property file

seeds/properties.yml

(Applies to dbt v1.9 and later)

```yaml

seeds:
  - name: [<seed-name>]
    config:
      enabled: true | false
      tags: <string> | [<string>]
      pre_hook: <sql-statement> | [<sql-statement>]
      post_hook: <sql-statement> | [<sql-statement>]
      database: <string>
      schema: <string>
      alias: <string>
      persist_docs: <dict>
      full_refresh: <boolean>
      meta: {<dictionary>}
      grants: {<dictionary>}
      event_time: my_time_field
```

## Configuring seeds

Seeds can only be configured from YAML files, either in `dbt_project.yml` or within an individual seed's YAML properties. It is not possible to configure a seed from within its CSV file.

Seed configurations, like model configurations, are applied hierarchically — configurations applied to a `marketing` subdirectory will take precedence over configurations applied to the entire `jaffle_shop` project, and configurations defined in a specific seed's properties will override configurations defined in `dbt_project.yml`.

### Examples

#### Apply the `schema` configuration to all seeds

To apply a configuration to all seeds, including those in any installed [packages](../docs/build/packages.md), nest the configuration directly under the `seeds` key:

dbt\_project.yml

```yml

seeds:
  +schema: seed_data
```

#### Apply the `schema` configuration to all seeds in your project

To apply a configuration to all seeds in your project only (i.e. *excluding* any seeds in installed packages), provide your [project name](./project-configs/name.md) as part of the resource path.

For a project named `jaffle_shop`:

dbt\_project.yml

```yml

seeds:
  jaffle_shop:
    +schema: seed_data
```

Similarly, you can use the name of an installed package to configure seeds in that package.

#### Apply the `schema` configuration to one seed only

To apply a configuration to one seed only, provide the full resource path (including the project name, and subdirectories).

seeds/marketing/properties.yml

```yml

seeds:
  - name: utm_parameters
    config:
      schema: seed_data
```

In older versions of dbt, you must define configurations in `dbt_project.yml` and include the full resource path (including the project name, and subdirectories). For a project named `jaffle_shop`, with a seed file at `seeds/marketing/utm_parameters.csv`, this would look like:

dbt\_project.yml

```yml
seeds:
  jaffle_shop:
    marketing:
      utm_parameters:
        +schema: seed_data
```

## Example seed configuration

The following is a valid seed configuration for a project with:

* `name: jaffle_shop`
* A seed file at `seeds/country_codes.csv`, and
* A seed file at `seeds/marketing/utm_parameters.csv`

dbt\_project.yml

```yml
name: jaffle_shop
...
seeds:
  jaffle_shop:
    +enabled: true
    +schema: seed_data
    # This configures seeds/country_codes.csv
    country_codes:
      # Override column types
      +column_types:
        country_code: varchar(2)
        country_name: varchar(32)
    marketing:
      +schema: marketing # this will take precedence
```

## Was this page helpful?

YesNo

[Privacy policy](https://www.getdbt.com/cloud/privacy-policy)[Create a GitHub issue](https://github.com/dbt-labs/docs.getdbt.com/issues)

This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply.
