Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Rui Machado, Hélder Russa

Rating No ratings yet

With the shift from data warehouses to data lakes, data now lands in repositories before it's been transformed, enabling engineers to model raw data into clean, well-defined datasets. DBT (data build tool) helps you take data further. This practical book shows data analysts, data engineers, BI developers, and data scientists how to create a true self-service transformation platform through the use of dynamic SQL. Authors Rui Machado from Monstarlab and Helder Russa from Jumia show you how to quickly deliver new data products by focusing more on value delivery and less on architectural and engineering aspects. If you know your business well and have the technical skills to model raw data into clean, well-defined datasets, you'll learn how to design and deliver data models without any technical influence. With this book, you'll learn: What DBT is and how a DBT project is structured How DBT fits into the data engineering and analytics worlds How to collaborate on building data models The main tools and architectures for building useful, functional data models How to fit DBT into data warehousing and laking architecture How to build tests for data transformations

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Analytics Engineering with SQL and dbt: Building Meaningful Data Models at Scale ## 【One-Line Pitch】 A practical guide for data professionals who want to move beyond monolithic SQL scripts and build modular, testable, and documented data models using dbt—ideal for analysts, engineers, and BI developers seeking a self-service transformation platform. ## 【Book Arc】 - **Opening (~0%–6%)**: Introduces the analytics engineering role and the shift from traditional data warehousing to modern data platforms, positioning dbt as a hybrid open-source tool that bridges cloud and on-premises deployments. - **Early (~6%–19%)**: Traces the evolution of data management—from Inmon and Kimball's foundational warehousing theories through Hadoop and Redshift to today's cloud ecosystems—while addressing the benefits and risks of cloud adoption. - **Early (~19%–28%)**: Defines the analytics engineer's responsibilities, including pipeline design, machine learning support, and the limitations of stored-procedure-based ETL approaches. - **Early (~28%–38%)**: Covers data modeling fundamentals, including conceptual-to-logical mapping rules, normalization principles, and the trade-offs between OLTP and analytics-optimized designs. - **Middle (~38%–47%)**: Explores dimensional modeling patterns—star schemas, snowflake schemas, and Data Vault—alongside the pitfalls of monolithic SQL script approaches to data transformation. - **Middle (~47%–53%)**: Transitions into dbt's design philosophy, data flow, and project structure, setting up hands-on implementation with dbt Cloud, BigQuery, and GitHub. ## 【Key Takeaways】 - **Analytics engineering is a distinct discipline** (Early): It bridges data engineering and analytics, requiring proficiency in SQL, Python, and cloud platforms to build reliable, actionable data pipelines. - **Cloud adoption is inevitable but risky** (Early): Benefits like scalability and flexibility come with security concerns—data privacy, vendor lock-in, and complex cost structures must be actively managed. - **Stored procedures have serious limitations for ETL** (Early): While functional for simple extract-transform-load tasks, they demand specialized expertise, lack version control, and become unwieldy for complex transformations. - **Normalization serves OLTP, not analytics** (Middle): Transactional systems benefit from reduced redundancy and fast writes, but analytics users need read-optimized structures that minimize joins and preserve historical data. - **Dimensional modeling remains foundational** (Middle): Star schemas simplify data access, snowflake schemas offer better normalization for complex relationships, and Data Vault supports historical tracking—each with distinct trade-offs. - **Monolithic SQL scripts are a maintenance nightmare** (Middle): Thousands-of-lines scripts without version control, unclear dependencies, and poor reusability create fragile systems where small changes trigger cascading failures. - **dbt introduces modularity and idempotency** (Middle): By structuring transformations as discrete, version-controlled models with defined dependencies, dbt addresses the core weaknesses of traditional SQL-based data modeling. ## 【Reading Tips】 - **Skim Chapter 1's history sections** (~6%–19%): The evolution from Inmon/Kimball through Hadoop to cloud platforms is useful context but not essential for hands-on dbt work—focus on the cloud risk discussion if you're evaluating architecture. - **Deep-read the data modeling chapters** (~28%–47%): Normalization rules, ERD mapping, and schema comparisons are foundational—these concepts directly inform how you structure dbt models later. - **Pay attention to the stored procedure example** (~28%): Even if you're not a SQL expert, understanding this basic ETL pattern highlights why dbt's approach is superior; Chapter 3 covers SQL foundations if needed. - **Note the monolithic modeling critique** (~47%): This section articulates the exact problems dbt solves—version control, dependency management, reusability, and idempotency—so it's worth reading carefully before diving into dbt specifics. - **Use the dbt project structure section** (~47%+) as your implementation reference: The Jaffle Shop example and YAML/model/source/test organization will be your practical template. ## 【Coverage Limits】 The excerpts cover the book's conceptual foundations and early dbt introduction but do not include the full hands-on dbt Cloud setup walkthrough, detailed SQL function references, or the testing and documentation chapters in depth. ##
Page 6
59 Debugging and Optimizing Data Models 60 Medallion Architecture Pattern 63 Summary 66 3. SQL for Analytics. . . . . . . . . . . . . . . . . . . . . . . . ....
View in text
Excerpt 2
o their specific needs, whether in the cloud or on premises. In its cloud version, dbt integrates seamlessly with leading cloud platforms, including Microsof...
View in text
Excerpt 3
the lack of 18 | Chapter 1: Analytics Engineering CHAPTER 2 Data Modeling for Analytics In today’s data-driven world, organizations rely more and more on dat...
View in text
Excerpt 4
ical changes in specific attributes. Monolith Data Modeling Until recently, the prevailing approach to data modeling revolved around the creation of extensiv...
View in text
Excerpt 5
sistency between the two versions and minimizes the risk of future data discrepancies. This technique is particularly effective when working with a well-esta...
View in text
Excerpt 6
ING filter. An optional clause closely related to GROUP BY, the HAVING filter applies conditions to the grouped data. Compared with the WHERE clause, HAVING...
View in text
Excerpt 7
window functions is ranking results within a given window, which allows ranking per group or creating relative rankings based on specific crite‐ ria. In addi...
View in text
Excerpt 8
rn. It allows us to register data tables, apply SQL queries for data preprocessing, and create and train machine learning models within a SQL context. Howeve...
View in text
Tags
AI categories
DataSQLBackend
Publisher: O'Reilly Media
Publish Year: 2024
Language: English
Pages: 324
File Format: PDF
File Size: 2.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…