Skip to content

Commit

Permalink
Merge pull request #394 from duckdb/jwills_meta_vs_config
Browse files Browse the repository at this point in the history
Update the README with examples of using either meta or config for setting up external sources
  • Loading branch information
jwills committed May 8, 2024
2 parents d5764c2 + ab606c6 commit ea57670
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ them from the database first.
#### Reading from external files

You may reference external files in your dbt models either directly or as dbt `source`s by configuring the `external_location`
meta option on the source:
in either the `meta` or the `config` option on the source definition. The difference is that settings under the `meta` option
will be propagated to the documentation for the source generated via `dbt docs generate`, but the settings under the `config`
option will not be. Any source settings that should be excluded from the docs should be specified via `config`, while any
options that you would like to be included in the generated documentation should live under `meta`.

```
sources:
Expand Down Expand Up @@ -244,7 +247,7 @@ sources:
tables:
- name: source1
- name: source2
meta:
config:
external_location: "read_parquet(['s3://my-bucket/my-sources/source2a.parquet', 's3://my-bucket/my-sources/source2b.parquet'])"
```

Expand All @@ -270,7 +273,7 @@ sources:
- name: flights_source
tables:
- name: flights
meta:
config:
external_location: "read_csv('flights.csv', types={'FlightDate': 'DATE'}, names=['FlightDate', 'UniqueCarrier'])"
formatter: oldstyle
```
Expand Down

0 comments on commit ea57670

Please sign in to comment.