What are some rules of thumb you guys consider for...
# best-practices
i
What are some rules of thumb you guys consider for materializing dbt models? My load/landing tables are tables, of course, but I have a staging layer after that, which then feed my dims/facts, which then feed my bi-ready datasets. Should I be materializing as views from staging-dim-bi? Materialize as tables just at the bi layer? Or some other mix? What are the advantages of doing it x or y way? My data size is pretty small - usually somewhere between a few tens of thousands of rows and a few million rows (with larger tables being the exception).
d
I use materialised tables for basically everything in my BI layer. Largest table in there is about 5 million rows. Redshift serverless eats it for breakfast.
i
Yeah one would figure a few million rows is chump change for Snowflake or any serverless dwh that's built for managing/processing data well into the terabyte scale. After reading the dbt docs further I think I'll materialize staging layer as views and then dim/fact & bi layers as tables.