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

Support create directories at write time #337

Open
dchimeno opened this issue Feb 14, 2024 · 1 comment
Open

Support create directories at write time #337

dchimeno opened this issue Feb 14, 2024 · 1 comment

Comments

@dchimeno
Copy link

duckdb/duckdb#10665

I've created this discussion at duckdb repo, probably belong to duckdb, but not sure if should/could be treated here before.

The general idea what I would like:, with a model config like this:

{{ config(
    materialized='external', 
    format='parquet',
    incremental_strategy = 'insert_overwrite',
    location="{{ env_var('DATALAKE_PATH') }}/a/b/c/whatever.parquet"
    ) }}

I would like to this work either with s3 urls or local.

DATALAKE_PATH="data"
DATALAKE_PATH="s3://a-bucket"

It's working with s3, but not with local filesystem raising an error like:

  IO Error: No files found that match the pattern "/data/a/b/c/whatever.parquet"

because a, b, or c doesnt exist.

@jwills
Copy link
Collaborator

jwills commented Feb 14, 2024

yeah whenever duckdb supports this option it's easy to incorporate it into dbt-duckdb's external materializations via the options dictionary argument; I can't think of a good way to hack this into dbt-duckdb itself tho, it's beyond the scope of jinja to do this sort of thing in like a macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants