Book Profile
Analytics Engineering with SQL and dbt Building Meaningful Data Models at Scale
Rui Pedro Machado · 2023
A practical guide to modern analytics engineering that shows how to transform raw data into trustworthy, meaningful data models at scale using SQL and dbt while honoring foundational data modeling principles.
Get the book →Positioned at the crossroads of the analytical rigor of Sherlock Holmes and the engineering power of Iron Man, this book argues that analytics engineering is not merely about flashy pipelines and visualizations but about disciplined data modeling and transformation aligned to business strategy. It traces the evolution of data management from data warehousing and ETL to the modern data stack, explains the emerging role of the analytics engineer as a bridge between data engineering and data analytics, and grounds readers in databases, SQL fundamentals, and the enduring value of data modeling (conceptual/logical/physical, normalization, star and snowflake schemas, Data Vault, and medallion architecture). It then teaches dbt end to end—models, materializations, sources, tests, documentation, macros, packages, snapshots, and the semantic layer—before culminating in a full omnichannel analytics use case that carries a reader from operational database design through ELT into BigQuery, dimensional modeling in dbt, testing, documentation, deployment, and SQL-based analytics. Readers walk away able to build resilient, reusable, well-tested, and well-documented data value chains.
What it argues
A causal framework in which design levers (modular modeling, dbt tooling adoption, testing, documentation) and contextual conditions (cloud data platform, business alignment) shape psychological and behavioral states (trust, collaboration, code maintainability) that drive outcomes (data quality, decision-making effectiveness, delivery speed).
Key ideas it contributes
- Business Strategy Alignment — The degree to which analytics engineering efforts and data models are purposefully aligned with organizational strategy, goals, and real knowledge gaps.
- Modular Data Modeling — The practice of decomposing data transformations into smaller, reusable, layered components applying decomposition, abstraction, and reusability.
- dbt Tooling Adoption — The extent to which teams leverage dbt features to build and orchestrate data transformations.
- Data Testing Practices — The practice of asserting data conforms to expected patterns, integrity, and business rules via generic/singular tests and source freshness checks.
- Documentation Practices — The inline documentation of models, columns, sources, and lineage producing an accessible single source of truth.
- Cloud Data Platform Capability — The availability and use of scalable cloud data platforms providing compute, storage, and native integration for ELT and analytics.
- Code Maintainability and Reusability — The state in which analytics code is DRY, readable, easy to debug, and adaptable to change.
- Stakeholder Trust in Data — Confidence held by stakeholders and data consumers in the accuracy, reliability, and freshness of data models and metrics.