How to structure your project in data build tool (dbt) | Tutorial for beginners

preview_player
Показать описание
❄️Want to SUPERCHARGE your career and become an EXPERT in Snowflake??❄️
Mastering Snowflake is accepting applications now to work with us in a small group. Serious inquiries only pls.

In our next video in this dbt series we look at re-organising our project in data build tool (dbt) on Snowflake.

We create folders for our staging and mart models before moving our configuration blocks into our project yml file. This allows us to apply configurations at a folder level to all models within it.

Additionally, we bring in another staging table from a new schema in Snowflake before adding a fact table to our project. This sets us up for our next lesson.

In this series I'll be producing a series of short videos which are based are dbt's excellent, free training modules found here:

❄️Order my book: Mastering Snowflake Solutions HERE: ❄️

stg_payment code:
with payments as (

select
id as payment_id,
orderid,
paymentmethod,
status,
amount,
created

)

select * from payments

fct_orders code:
with orders as (
select * from {{ ref('stg_orders')}}
),

payments as (
select * from {{ ref('stg_payment')}}
),

fct_orders as (
select order_id,
payment_id,
amount
from orders o
)

select * from fct_orders

❄️Want to SUPERCHARGE your career and become an EXPERT in Snowflake??❄️

Mastering Snowflake is accepting applications now to work with us in a small group. Serious inquiries only pls. Book a call with us here:

❄️Get my Free SnowPro core guide HERE: ❄️

❄️Become a student on my course: ❄️

❄️Connect with me on Linkedin:❄️
Рекомендации по теме
Комментарии
Автор

at 3:20 you created core within marts or outside marts? because when you refresh the structure, I see core as a separate folder outside marts

srijitbhattacharya
Автор

It's really good! Thanks :)
I have to say it's a bit difficult to follow without the scripts you are actually using though :S

vicmartal
Автор

Hi Adam, good video! I have a little question, at 5:18, why "staging" and "core" are in the same level? Does staging need to be in the same level as "marts" instead?

martindominikus
Автор

what to do if in an environment, I am not able to see "models" folder only. How to create it

knowtechwithaman
Автор

Hi Adam. Could you please share the tables scripts ? thanks in advance

rodrigoschammass
Автор

awesome vid, thanks!
seems you're not committing quite frequently ;)

masoudghodrati
join shbcf.ru