0% found this document useful (0 votes)
236 views15 pages

DBT Flow

The document provides an overview of the Data Build Tool (DBT), which is used for data transformation in an ELT process. It outlines the advantages of DBT, such as easy testing, reusable code, and CI/CD integration, as well as prerequisites for using DBT. Additionally, it describes DBT models, materialization types, and the concept of DBT macros for code reusability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views15 pages

DBT Flow

The document provides an overview of the Data Build Tool (DBT), which is used for data transformation in an ELT process. It outlines the advantages of DBT, such as easy testing, reusable code, and CI/CD integration, as well as prerequisites for using DBT. Additionally, it describes DBT models, materialization types, and the concept of DBT macros for code reusability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Source Data

Systems
Praveen DBT Real Time Project Flow Consumers
 Develop
 Test
Data Files  Deploy
 Document

Raw Transformed
RDBMS Data Data
On-Premises

ELT Copy  Data Lineage


 Version Control
Cloud DBs
Praveen_9703180969
Data Build Tool
What is DBT
• Data Build Tool
• Used for Data Transformation
• Not a ETL Tool
• ELT => T
• Raw Data => DBT => Transformed Data
Praveen_9703180969
Why DBT
Coding
Testing
Deployment
Documentation
Data Lineage
Advantages of DBT
• Easy Testing
• Reusable Code (Macros & JINJA )
• CI CD Integration
• Data Lineage
• Documentation
Prerequisites of DBT
• Basic SQL Statements
• Snowflake DW
• Table & its Types
• View & its Types
DBT Models
Tables
DBT Models
SQL Select DBT run
Statements

Views

Praveen_9703180969
How to Refer Dbt Model
select * from {{ ref('model_name') }}
How to Run Model
dbt run –m mdl_nm
Types of Materializations in DBT
• Table
• View
• Incremental
• Ephemeral
DBT Macros

Snowflake and DBT Training - 9703180969


What is DBT Macro
 Macros are Piece of SQL code
that can be reused
 UDFS
 Code Reusability

Snowflake and DBT Training - 9703180969


Syntax DBT Macro
{% macro macro_name(arg1, arg2) %}
-- Macro logic goes here
{% endmacro %}

Snowflake and DBT Training - 9703180969

You might also like