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

dbt_utils with duckdb #288

Open
QishunX opened this issue Nov 8, 2023 · 1 comment
Open

dbt_utils with duckdb #288

QishunX opened this issue Nov 8, 2023 · 1 comment

Comments

@QishunX
Copy link

QishunX commented Nov 8, 2023

My dbt model read table from database, and union them.
My code is like this:
{% set dm_relations = dbt_utils.get_relations_by_pattern('ex_%company%', 'client_name') %}

{{ dbt_utils.union_relations(
relations=dm_relations,
) }}

if I want to read file from s3, how to change this code to read the file has same pattern and union them?

@jwills
Copy link
Collaborator

jwills commented Nov 8, 2023

Hey @QishunX! Have you checked out DuckDB's bult-in glob utilities for files? https://duckdb.org/docs/data/multiple_files/overview.html

That would be my recommendation here, but if that won't work for some reason, let me know and we'll see what else we can come up with.

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