DBT Tutorial: Templating using Jinja

Veröffentlicht am: 01 März 2024
auf dem Kanal: Anirvan Decodes
2,925
50

🚀 Welcome to Anirvan Decodes! 🚀


In this video we will learn how to use Jinja in DBT.
Using Jinja you can turn your dbt project into a programming environment for SQL, giving you the ability to do things that aren't normally possible in SQL


Resources:

CSV file : https://github.com/dbt-labs/jaffle_sh...

SQL statement

{% set payment_methods = ["bank_transfer", "credit_card", "gift_card"] %}

select
order_id,
{% for payment_method in payment_methods %}
sum(case when payment_method = '{{payment_method}}' then amount end) as {{payment_method}}_amount
{% if not loop.last %},{% endif %}
{% endfor %}
from {{ ref('raw_payments') }}
group by 1





dbt macro,jinja sql,jinja if,jinja for loop,dbt variables,jinja template,dbt macros,dbt data,jinja else if,dbt log,dbt docs,jinja comment,dbt utils,what is jinja,dbt post hook,dbt core,Jinja and macros,Using Jinja


Rock Angel by Joakim Karud

/ joakimkarud
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
http://creativecommons.org/licenses/b...
Music promoted by Audio Library

• Video

–––


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Music: Uplifting And Inspiring Acoustic Corporate by Wavecont
https://protunes.net
Video Link:

• Wavecont - Uplifting And Inspiring Ac...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Auf dieser Seite können Sie das Online-Video DBT Tutorial: Templating using Jinja mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Anirvan Decodes 01 März 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,925 Mal angesehen und es wurde von 50 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!