duckdb / dbt-duckdb

dbt (http://getdbt.com) adapter for DuckDB (http://duckdb.org)
Apache License 2.0
797 stars 69 forks source link

The model location config doesn't work as documented #227

Closed sacundim closed 11 months ago

sacundim commented 11 months ago

The current README, as written, at the very least strongly implies that one may use a template to generate the names of the output external files using template variable expansions like {{ name }} and {{ format }}:

Option Default Description
location {{ name }}.{{ format }} The path to write the external materialization to. See below for more details.

...but it doesn't actually work. I tried using for example {{ name }}-lol.{{ format }} and it produces files named -lol. (the variables expand to empty strings).

jwills commented 11 months ago

Yeah, that is unfortunate; jinja expansion does work inside of the location string, it's just that neither name nor format are variables in the context that jinja has access to (the equivalent of {{ name }} here would be e.g. {{ this.identifier }}.)

I'll post a PR to remove the implication.