dbt-duckdb
dbt-duckdb copied to clipboard
dbt_utils with duckdb
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?
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.