Structure Snowflake database, schema

I love this question @cab – thanks so much for posting it to Discourse. I’ve included some advice for folks that aren’t on Snowflake too.

I totally agree with @dapearce’s reply!

We often leverage the raw.<source>.* pattern on Snowflake (often, all our data sources are loaded by the same tool, but I can see the utility in including <connector>!). Note for warehouses where you can’t do cross-database queries (read: Redshift), I recommend using a raw_<source>.* pattern to get a similar result.

In terms of databases/schemas for objects built by dbt, in snowflake we often use an analytics.<mart>.* pattern. On Redshift, I like to use a pattern like zone_<mart>.* so the schemas get ordered nicely in your warehouse, but that’s my own preference!

Personally, I’d steer clear of using separate databases for each source (or collection of sources) in Snowflake, it feels like it would add too much complexity to the design without much benefit.

1 Like