Chapter 5. dbt Advanced Topics
dbt is a tool that focuses on the transformation part of the ELT process. With only SQL experience, we can develop all our analytical code with this tool. At the same time, in parallel, we can still encapsulate it under a set of best practices and standards typically found in software engineering, such as test development, automatic deployment, or even documentation built side by side while we develop.
In this chapter, our journey through dbt takes a more advanced and subtle turn. We will dig into the diverse collection of model materializations in dbt. Beyond the traditional views and tables, we’ll explore the potential of ephemeral models, leverage materialized views, capture data snapshots at precise moments, and even use incremental models, which free you from recurrent, resource-intensive full data loads.
But that’s not all. We’ll elevate your analytics code to the next level with Jinja, macros, and packages. We’re on a mission to transform your codebase, making it more efficient and DRY-er. By the end of this chapter, you’ll be supplied with the knowledge and tools to level up your analytics workflow, enabling you to deliver insights faster and with even greater precision.
Model Materializations
Materializations are strategies for persisting dbt models in a data platform. In dbt, materializations can be used to improve the performance and scalability of a data model by reducing the need to compute queries and views on the fly.
In dbt, various ...
Get Analytics Engineering with SQL and dbt now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.