Skip to content
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

Add documentation to configure "delimiter" for seed files #3015

Open
1 task
ramonvermeulen opened this issue Mar 17, 2023 · 1 comment
Open
1 task

Add documentation to configure "delimiter" for seed files #3015

ramonvermeulen opened this issue Mar 17, 2023 · 1 comment
Labels
blocked_by_dev Awaiting merge of PR with associated functionality content Improvements or additions to content

Comments

@ramonvermeulen
Copy link

ramonvermeulen commented Mar 17, 2023

Contributions

  • I am a PM or subject matter expert at dbt who is responsible for this feature.

Where does this content belong?

https://docs.getdbt.com/reference/seed-configs
The configurable delimiter option should be added to the list of arguments for the seed configuration as soon as dbt-labs/dbt-core#7186 gets merged.

Then there needs to be a new documentation link:

https://docs.getdbt.com/reference/resource-configs/delimiter

Link to source material

I have no access to the template (asked for permission), but the example on the seeds-config page should be:

version: 2

seeds:
  - name: [<seed-name>]
    config:
      [quote_columns](https://docs.getdbt.com/reference/resource-configs/quote_columns): true | false
      [column_types](https://docs.getdbt.com/reference/resource-configs/column_types): {column_name: datatype}
      [delimiter](https://docs.getdbt.com/reference/resource-configs/delimiter): <string>

and for the (new) url: https://docs.getdbt.com/reference/resource-configs/delimiter

Definition

An optional seed configuration, used to determine which delimiter should be used by the csv parser when a table is created. Defaults to comma.

Usage

Globally use a pipe as delimiter for seed files

seeds:
  +delimiter: '|'

Only use the pipe delimiter for seeds in the seeds/mappings directory.

For a project with:

  • name: jaffle_shop in the dbt_project.yml file
  • seed-paths: ["seeds"] in the dbt_project.yml file
version: 2

seeds:
  - name: mappings
    config:
      delimiter: '|'

Recommended configuration

  • Explicitly set this value when you want to use a different delimiter in a seed file than a comma
  • When using a mix of different seed files with delimiters, configure this value on a per seed file basis
@ramonvermeulen ramonvermeulen added the content Improvements or additions to content label Mar 17, 2023
@runleonarun runleonarun added the blocked_by_dev Awaiting merge of PR with associated functionality label Jun 29, 2023
@ramonvermeulen
Copy link
Author

PR got merged, heads up for the documentation on seed files to be changed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked_by_dev Awaiting merge of PR with associated functionality content Improvements or additions to content
Projects
None yet
Development

No branches or pull requests

2 participants