# Data Engineer roadmap

> Build reliable batch and streaming pipelines with SQL, Python, Spark, dbt, Airflow, Kafka and a cloud warehouse or lakehouse.

Canonical: https://www.internhack.in/roadmaps/tracks/data-engineer
Last updated: 2026-11-28

14 sections, 63 topics, about 391 hours.

A complete path from first shell command to job-ready data engineer. Start with Linux, Git, Python and SQL for data work, including window functions and query plans. Learn to model data for analytics with normalization, star and snowflake schemas and slowly changing dimensions, and to store it well with CSV, JSON, Parquet and Avro in object storage. Process large datasets with Apache Spark, load them into Snowflake, BigQuery or Redshift and open lakehouse tables with Delta Lake or Iceberg, and transform them with dbt. Orchestrate pipelines with Airflow, Dagster or Prefect in Docker, stream events with Kafka and Spark Structured Streaming or Flink, and protect trust with data quality tests, observability, governance, lineage, privacy and cost control on AWS or Google Cloud. Finish with portfolio projects, a capstone platform, system design practice and interview preparation.

## Outcomes

- Work fluently on the Linux command line and collaborate through Git and pull requests
- Write production-grade Python for ingestion, including APIs with pagination, retries and incremental watermarks
- Write advanced SQL with CTEs and window functions, and tune queries using execution plans
- Design OLTP and analytical schemas, star schemas and SCD Type 2 dimensions
- Choose file formats, partitioning and object storage layouts that keep queries fast and cheap
- Build and tune distributed batch jobs with PySpark
- Load and model data in a cloud warehouse and in Delta Lake or Iceberg lakehouse tables
- Build tested, documented ELT pipelines with dbt
- Orchestrate idempotent, backfillable pipelines with Airflow, Dagster or Prefect in Docker
- Stream events with Kafka and process them with Spark Structured Streaming or Flink
- Protect data trust with quality tests, observability, governance, lineage and privacy controls
- Run data platforms on AWS or Google Cloud with infrastructure as code and cost awareness
- Show job-ready skills through portfolio projects, a capstone, system design practice and interview preparation

## Prerequisites

- Comfort with basic computer use and installing software
- Basic programming exposure in any language is helpful but not required

## Data Engineering Foundations

What data engineers actually build, how data flows from source systems to consumers, and the command line and Git habits every pipeline depends on.

### The Data Engineer Role

core · beginner · about 2 h · https://www.internhack.in/roadmaps/tracks/data-engineer/role

Understand what data engineers own, how the role differs from analysts, analytics engineers and ML engineers, and what Indian companies hire for.

A data engineer builds and runs the systems that move data from where it is created to where it is used. Analysts, data scientists and ML models are only as good as the pipelines feeding them, and those pipelines are your job.

#### What the work looks like day to day
- **Ingestion**: pulling data from app databases, APIs, event streams and files into a central store.
- **Transformation**: cleaning, joining and reshaping raw data into tables people can trust.
- **Storage and modeling**: choosing formats, partitions and table designs in a warehouse or lakehouse.
- **Orchestration and operations**: scheduling jobs, handling failures, backfilling history and keeping costs in check.
- **Quality and governance**: tests, alerts, documentation, access control and lineage.

#### Neighbouring roles
- **Data analyst**: answers business questions using the tables you build.
- **Analytics engineer**: owns the modeling layer (often dbt) between raw data and dashboards. Many data engineers do this too.
- **ML engineer**: productionises models and needs features and training data from your pipelines.
- **Platform or infra data engineer**: builds the shared tooling (Spark clusters, Kafka, Airflow) other teams use.

#### The Indian hiring picture
Product companies such as Flipkart, Swiggy, Zomato, PhonePe and Razorpay, plus GCCs (global capability centres) and IT services firms, hire data engineers in large numbers. Freshers are usually screened on **SQL, Python, one big data tool (Spark) and one cloud**. Strong SQL is the single most tested skill.

#### Pitfalls
- Learning ten tools shallowly. Depth in SQL, Python, Spark and one orchestrator beats a long list of logos on a resume.
- Ignoring the business. Pipelines exist to answer questions; know who uses your tables and why.

You are ready to move on when you can explain, in two minutes, how a single Swiggy order could flow from the app database into a daily revenue dashboard and which parts of that flow a data engineer owns.

Key concepts: Ingestion, transformation, serving, Data engineer vs analytics engineer, Data engineer vs ML engineer, Platform data engineering, Reading DE job descriptions, Stakeholders and data consumers.

Mini project: Collect five data engineer job descriptions from Indian companies (product, GCC and services). Build a table of the skills mentioned, count how often each appears, and circle the top five you will prioritise.

Self-check: An analyst says the revenue dashboard is wrong. Which parts of the data flow would you check first, and which of them are your responsibility?

Resources:
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [What is analytics engineering? (dbt docs)](https://docs.getdbt.com/docs/introduction) (dbt Labs)
- [SQL roadmap](https://roadmap.sh/sql) (roadmap.sh)

### The Data Lifecycle and Pipeline Architecture

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/data-lifecycle

Learn the stages data passes through, batch versus streaming, and the common architectures (warehouse, lake, lakehouse, medallion) you will meet at work.

Before learning tools, learn the shape of the problem. Every data platform, from a two-person startup to a bank, follows roughly the same lifecycle.

#### The stages
1. **Generation**: source systems create data (an OLTP database for orders, a mobile app emitting click events, a payment gateway webhook).
2. **Ingestion**: data is copied out, either in **batches** (every hour, every night) or as a **stream** (event by event).
3. **Storage**: landed in object storage (a data lake), a warehouse, or both.
4. **Transformation**: cleaned, deduplicated, joined and modeled.
5. **Serving**: exposed to dashboards, notebooks, reverse ETL, ML features or APIs.

Cutting across all stages are **orchestration, data quality, security, governance and cost**.

#### Batch vs streaming
Batch is simpler, cheaper and good enough for most reporting ("yesterday's sales"). Streaming is for low-latency needs such as fraud checks on UPI transactions or live delivery tracking. Start with batch unless a real business need demands seconds of latency.

#### Common architectures
- **Data warehouse**: structured, modeled tables in a SQL engine (Snowflake, BigQuery, Redshift).
- **Data lake**: cheap object storage (S3, GCS) holding raw files of any format.
- **Lakehouse**: lake storage plus table formats (Delta Lake, Iceberg) that add transactions and schema, queried by Spark or SQL engines.
- **Medallion layers**: bronze (raw), silver (cleaned), gold (business-ready). A naming convention, not a product.

#### Pitfalls
- Building streaming because it sounds impressive when a nightly job would do.
- Skipping a raw layer. Keep an untouched copy of source data so you can rebuild when logic changes.

You are ready to move on when you can sketch a pipeline for an e-commerce site on paper, labelling each lifecycle stage, and justify whether each part should be batch or streaming.

Key concepts: Generation, ingestion, storage, transformation, serving, Batch vs streaming, Data warehouse vs data lake, Lakehouse, Medallion architecture, Lambda and Kappa architectures, Reverse ETL.

Mini project: Draw an architecture diagram for a food delivery app's analytics platform: sources, ingestion method, storage layers, transformations, and three consumers. Write one paragraph per box explaining the choice.

Self-check: A team wants dashboards that refresh every five minutes. Is that a streaming problem? What questions would you ask before deciding?

Resources:
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [Medallion architecture](https://www.databricks.com/glossary/medallion-architecture) (Databricks)
- [Delta Lake documentation](https://docs.delta.io/) (Delta Lake)

### Linux and the Command Line for Data Work

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/linux-cli

Get comfortable on a Linux shell: navigating files, inspecting large datasets, piping commands, permissions, processes, SSH and cron.

Pipelines run on Linux servers and containers, so the shell is where you debug them. You will tail logs, peek at multi-gigabyte CSVs and SSH into machines long before you touch a fancy UI.

#### Everyday commands
- Navigation and files: `ls`, `cd`, `pwd`, `cp`, `mv`, `rm`, `mkdir`, `find`.
- Looking at data without opening it: `head`, `tail -f`, `wc -l`, `less`, `cut`, `sort`, `uniq -c`.
- Searching and transforming: `grep`, `sed`, `awk`, and `jq` for JSON.
- Pipes and redirection: `cat orders.csv | cut -d, -f3 | sort | uniq -c | sort -nr | head` finds the top cities in seconds.

#### System basics
- **Permissions**: read, write, execute for user, group and others; `chmod` and `chown`.
- **Processes**: `ps`, `top` or `htop`, `kill`, background jobs, `nohup`.
- **Disk and memory**: `df -h`, `du -sh`, `free -h`. Full disks kill pipelines more often than bad code.
- **Environment variables** for config and secrets, and `.bashrc` for your setup.
- **SSH** with keys, and `scp` or `rsync` for moving files.
- **cron** for simple schedules, the ancestor of every orchestrator.

#### Shell scripts
Write small Bash scripts with `set -euo pipefail` so they fail loudly. Anything longer than about 50 lines usually belongs in Python.

#### Pitfalls
- Running `rm -rf` with an unset variable in the path. Quote variables and use `set -u`.
- Opening a 5 GB file in a text editor. Use `head` and `wc` first.
- Windows users: use WSL2 so your environment matches production.

You are ready to move on when you can answer "how many rows, how many distinct values in column 4, and what does the last line look like?" for a large CSV using only the shell.

Key concepts: Files, directories and paths, head, tail, wc, less, grep, sed, awk, cut, sort, uniq, Pipes and redirection, Permissions and users, Processes and resource usage, SSH, scp and rsync, cron scheduling, jq for JSON, WSL2 on Windows.

Mini project: Download a public CSV from data.gov.in. Using only shell commands, report row count, column headers, the top 10 values of one column with counts, and any rows with the wrong number of fields. Save the commands as a Bash script.

Self-check: A nightly job failed with 'No space left on device'. Which commands would you run to find what filled the disk?

Resources:
- [The Missing Semester of Your CS Education](https://missing.csail.mit.edu/) (MIT)
- [Linux Journey](https://linuxjourney.com/) (Linux Journey)
- [Linux roadmap](https://roadmap.sh/linux) (roadmap.sh)
- [GNU Bash manual](https://www.gnu.org/software/bash/manual/) (GNU)

### Git and Collaborative Workflows

core · beginner · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/git

Version every pipeline, SQL model and config with Git, and work with branches, pull requests and code review like a professional team.

Data code is code. Your SQL models, DAGs, Spark jobs and infrastructure configs all live in Git, go through pull requests and get deployed by CI. Teams that edit SQL directly in a warehouse UI lose history and break production.

#### Core skills
- The model: working directory, staging area, commits, branches, remotes.
- Daily commands: `git status`, `add`, `commit`, `log`, `diff`, `branch`, `switch`, `pull`, `push`.
- **Branching**: one short-lived feature branch per change, merged through a pull request.
- **Merge conflicts**: read the markers, decide, test, commit.
- **Undo safely**: `git restore`, `git revert` for shared history, `git reset` only for local work.

#### Data-specific habits
- Never commit data files, credentials or `.env` files. Use `.gitignore` and a secrets manager.
- Keep notebooks small or pair them with scripts; large notebook diffs are unreadable.
- Write commit messages that explain *why* a transformation changed ("exclude test merchants from GMV").
- Review SQL like code: check joins for fan-out, filters, and null handling.

#### CI basics
Most data teams run linting (sqlfluff, ruff), unit tests and `dbt build` on every pull request via GitHub Actions or similar. You will meet this again in the dbt and quality sections.

#### Pitfalls
- Committing a service account key. Rotate it immediately; deleting the commit is not enough once pushed.
- Long-lived branches that drift for weeks and become painful to merge.

You are ready to move on when you can create a branch, make a change, open a pull request, resolve a conflict with a teammate's change and merge it cleanly.

Key concepts: Commits, branches, remotes, Pull requests and code review, Merge conflicts, revert vs reset, .gitignore and secrets hygiene, Commit message conventions, GitHub Actions basics, Rebase and interactive history.

Mini project: Create a GitHub repo for your data engineering learning. Add a README, a .gitignore for Python and data files, and your shell script from the Linux topic. Make two branches that edit the same file, merge both through pull requests and resolve the conflict.

Self-check: You pushed a commit containing a database password to a public repo. List the steps you take, in order.

Resources:
- [Pro Git](https://git-scm.com/book/en/v2) (git-scm.com)
- [Git and GitHub roadmap](https://roadmap.sh/git-github) (roadmap.sh)
- [GitHub Docs](https://docs.github.com/en) (GitHub)

## Python for Data Engineering

Python is the glue of the data stack. Learn the language, how to move and reshape data with it, how to call APIs safely, and how to write code that runs reliably in production.

### Python Fundamentals

core · beginner · about 15 h · https://www.internhack.in/roadmaps/tracks/data-engineer/python-basics

Core Python syntax, data structures, functions, modules and error handling, with the emphasis on what data pipelines use most.

Python is the default language for data engineering: Airflow DAGs, PySpark jobs, ingestion scripts and tests are all Python. You do not need to be a software architect, but you must be fluent.

#### What to master
- **Types and data structures**: `str`, `int`, `float`, `bool`, `None`, lists, tuples, dicts and sets. Know when a set or dict lookup beats scanning a list.
- **Control flow**: `if`, `for`, `while`, comprehensions (`[r["city"] for r in rows if r["amount"] > 0]`).
- **Functions**: arguments, defaults, `*args` and `**kwargs`, return values, small pure functions.
- **Modules and imports**: splitting code into files, the standard library.
- **Exceptions**: `try`, `except`, `finally`, raising your own errors with clear messages.
- **Strings and dates**: f-strings, `datetime`, time zones (IST vs UTC matters for every Indian business).

#### Data-flavoured practice
Write functions that take a list of dicts (rows) and return aggregates, deduplicate by key, or group by a field. These are the same operations you will later do in SQL and Spark, so learning them by hand builds intuition.

#### Generators and iterators
`yield` lets you process a file or API response row by row without loading everything into memory. This is how you handle a 10 GB file on an 8 GB laptop.

#### Pitfalls
- Mutable default arguments (`def f(rows=[])`) that leak state between calls.
- Catching every exception with a bare `except:` and silently continuing. Failing loudly is better than loading bad data.
- Mixing naive and timezone-aware datetimes.

You are ready to move on when you can write a script that reads a list of transaction dicts, converts UTC timestamps to IST, and returns total amount per day without using pandas.

Key concepts: Data types and data structures, Control flow and comprehensions, Functions and modules, Exceptions and error handling, datetime and time zones, Generators and iterators, Classes and dataclasses, Decorators and context managers.

Mini project: Write a pure-Python module that takes a list of order dicts and returns daily GMV, order count per city, and duplicate order ids. Add a small main block that runs it on sample data.

Self-check: Why would you use a generator instead of a list when reading a 20 GB log file line by line?

Resources:
- [The Python Tutorial](https://docs.python.org/3/tutorial/) (Python.org)
- [Python roadmap](https://roadmap.sh/python) (roadmap.sh)
- [Kaggle Learn: Python](https://www.kaggle.com/learn) (Kaggle)

### Working with Files and DataFrames in Python

core · beginner · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/python-data-handling

Read and write CSV, JSON and Parquet in Python, and use pandas, Polars or DuckDB for small to medium transformations before reaching for Spark.

A lot of data engineering is moving files around and reshaping them. For data that fits on one machine (up to a few GB), Python libraries are faster to build with than a distributed system.

#### Standard library
- `csv` module for streaming CSV row by row, handling quoting and delimiters correctly.
- `json` for JSON documents and **JSON Lines** (one JSON object per line), the common format for logs and API dumps.
- `pathlib` for paths, `gzip` for compressed files.

#### pandas essentials
- Reading: `read_csv` with `dtype`, `parse_dates` and `usecols` to control memory.
- Core operations: filtering, `groupby`, `merge`, `pivot_table`, handling nulls with `isna` and `fillna`.
- Writing: `to_parquet` (via pyarrow) instead of CSV whenever the consumer allows it.
- Chunking: `read_csv(..., chunksize=100_000)` for files larger than memory.

#### Modern alternatives
- **Polars**: a fast DataFrame library with a lazy query engine; great for larger single-machine jobs.
- **DuckDB**: an in-process SQL engine that can query CSV and Parquet files directly. `SELECT city, SUM(amount) FROM 'orders/*.parquet' GROUP BY 1` runs on your laptop in seconds.
Knowing when one machine is enough saves companies real money.

#### Pitfalls
- Letting pandas guess types: phone numbers and PIN codes become floats and lose leading zeros.
- Using `iterrows` in loops over millions of rows. Use vectorised operations or SQL.
- Silently dropping rows in a merge. Check row counts before and after every join.

You are ready to move on when you can take a messy 1 GB CSV, clean the types, deduplicate, aggregate it and write partitioned Parquet, and explain why you chose pandas, Polars or DuckDB.

Key concepts: csv and json modules, JSON Lines, pandas read, transform, write, Explicit dtypes and memory, Chunked processing, Polars, DuckDB, pyarrow and Parquet.

Mini project: Take a public dataset (for example Indian Railways or air quality data from data.gov.in), clean it with pandas, then repeat the same aggregation in DuckDB SQL. Compare runtime and memory, and write the result to Parquet.

Self-check: A merge between orders (1M rows) and customers returns 1.4M rows. What happened and how do you find the cause?

Resources:
- [pandas documentation](https://pandas.pydata.org/docs/) (pandas)
- [DuckDB documentation](https://duckdb.org/docs/) (DuckDB)
- [Python csv module](https://docs.python.org/3/library/csv.html) (Python.org)
- [Apache Arrow Python docs](https://arrow.apache.org/docs/python/) (Apache Arrow)

### Ingesting Data from APIs

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/api-ingestion

Pull data reliably from REST APIs: authentication, pagination, rate limits, retries, incremental loads and landing raw responses safely.

Many sources (payment gateways, CRMs, ad platforms, government open data) only expose data through HTTP APIs. A good API extractor is boring, restartable and never loses or duplicates records.

#### The building blocks
- **HTTP basics**: methods, status codes (200, 401, 404, 429, 5xx), headers, JSON bodies.
- **Authentication**: API keys, bearer tokens, OAuth 2.0 client credentials. Keep secrets in environment variables or a secrets manager.
- **Pagination**: page numbers, offsets, or cursors. Cursor-based pagination is safest when data changes while you read.
- **Rate limits**: respect `429 Too Many Requests` and `Retry-After` headers.
- **Retries with backoff**: retry transient errors (timeouts, 5xx) with exponential backoff and a cap; never retry 4xx validation errors forever.

#### Incremental extraction
Do not re-download everything daily. Store a **watermark** such as the max `updated_at` you have seen, and request only newer records next run. Overlap the window slightly and deduplicate downstream to handle late updates.

#### Landing the data
Write the raw response (JSON Lines, gzipped) to object storage with the extraction timestamp in the path, for example `raw/razorpay/payments/dt=2026-10-24/`. Transform later. Keeping raw data lets you reprocess when parsing logic changes.

#### Pitfalls
- Using `requests.get` without a timeout; one hung call can block a pipeline for hours.
- Overwriting yesterday's file on rerun instead of writing idempotently.
- Assuming the API schema never changes. Log and alert on unexpected fields.

You are ready to move on when your extractor can be killed halfway, restarted, and still produce exactly one copy of every record.

Key concepts: HTTP methods and status codes, API keys, tokens and OAuth, Pagination styles, Rate limits and backoff, Incremental loads and watermarks, Landing raw JSON, Webhooks, Ingestion frameworks like dlt.

Mini project: Build a Python extractor for a free public API (for example GitHub's REST API for a popular repo's issues). Support pagination, retries with backoff, an incremental watermark stored in a file, and write gzipped JSON Lines partitioned by date.

Self-check: Your extractor fetches records with updated_at greater than the last watermark. Describe a scenario where a record is missed and how you would prevent it.

Resources:
- [Requests documentation](https://requests.readthedocs.io/) (Requests)
- [MDN: HTTP response status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) (MDN)
- [GitHub REST API docs](https://docs.github.com/en/rest) (GitHub)

### Production-Grade Python

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/python-production

Write Python that runs unattended: virtual environments, dependency pinning, project layout, configuration, logging, type hints and tests.

A notebook that works once is not a pipeline. Production code runs at 3 a.m. on a machine you cannot see, so it has to be reproducible, observable and tested.

#### Environments and dependencies
- Use a **virtual environment** per project (`venv`, or tools like uv or Poetry).
- **Pin dependencies** in a lock file so the server installs exactly what you tested.
- Structure code as a package (`src/your_pipeline/`) rather than a folder of loose scripts.

#### Configuration and secrets
Read settings from environment variables or config files, never hard-coded. Different values for dev, staging and prod; same code.

#### Logging
Use the `logging` module, not `print`. Log the start and end of each step, row counts, and the parameters (date, source) the job ran with. Structured (JSON) logs are easier to search in the cloud.

#### Type hints and linting
Type hints plus a checker (mypy or pyright) catch whole classes of bugs. A linter and formatter (ruff, black) keeps code consistent across the team.

#### Testing
- **Unit tests** with pytest for transformation functions: given these input rows, expect these output rows.
- **Fixtures** with tiny sample data, including nulls, duplicates and weird encodings.
- Tests run in CI on every pull request.

#### Pitfalls
- "Works on my machine" because a library version differs on the server.
- Logging secrets or full customer records; mask PII in logs.
- Only testing the happy path. Bugs live in empty files, nulls and duplicates.

You are ready to move on when your API extractor is a pinned, installable package with logging, config from environment variables, and a pytest suite that runs in GitHub Actions.

Key concepts: Virtual environments, Dependency pinning and lock files, Package layout, Config via environment variables, logging module, Type hints and mypy, pytest and fixtures, ruff or black.

Mini project: Refactor your API extractor into a package with a lock file, environment-based config, structured logging and at least five pytest tests (including empty response and duplicate records). Run the tests in a GitHub Actions workflow.

Self-check: Your job passes locally but fails on the server with an ImportError. What are the likely causes and how does a lock file help?

Resources:
- [Python venv module](https://docs.python.org/3/library/venv.html) (Python.org)
- [Python logging HOWTO](https://docs.python.org/3/howto/logging.html) (Python.org)
- [pytest documentation](https://docs.pytest.org/) (pytest)
- [Python Packaging User Guide](https://packaging.python.org/) (PyPA)

## SQL for Data Engineering

SQL is the most tested skill in data engineering interviews and the language of every warehouse. Go beyond SELECT to window functions, query plans and how databases actually execute your queries.

### SQL Fundamentals

core · beginner · about 12 h · https://www.internhack.in/roadmaps/tracks/data-engineer/sql-basics

Query relational data with SELECT, WHERE, GROUP BY, HAVING, ORDER BY and joins, and understand how NULLs and data types behave.

SQL is how you talk to databases and warehouses. Every data engineer interview in India starts with SQL, and most of your daily work ends in it.

#### The core query
- `SELECT` columns and expressions, `FROM` a table, `WHERE` to filter rows.
- `GROUP BY` with aggregates (`COUNT`, `SUM`, `AVG`, `MIN`, `MAX`), `HAVING` to filter groups.
- `ORDER BY` and `LIMIT`.
- Learn the **logical order**: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT. It explains why you cannot use a SELECT alias in WHERE.

#### Joins
- `INNER`, `LEFT`, `RIGHT`, `FULL OUTER` and `CROSS` joins.
- Joining on the right key: an order table joined to a payments table on `order_id` can multiply rows if an order has several payment attempts.
- Anti-joins (`LEFT JOIN ... WHERE right.id IS NULL` or `NOT EXISTS`) to find missing records.

#### NULLs and types
- `NULL` means unknown. `NULL = NULL` is not true; use `IS NULL`. `COUNT(col)` skips NULLs, `COUNT(*)` does not.
- Use `COALESCE` deliberately and know types: integers vs decimals for money, `DATE` vs `TIMESTAMP`, text.

#### DDL and DML
`CREATE TABLE`, `INSERT`, `UPDATE`, `DELETE`, primary and foreign keys. Practise on PostgreSQL locally or in Docker.

#### Pitfalls
- Using `DISTINCT` to hide a join that duplicated rows instead of fixing the join.
- Filtering a LEFT JOIN's right table in WHERE, which silently turns it into an INNER JOIN.
- Storing money as floats.

You are ready to move on when you can write, without help, a query returning each city's order count and revenue for last month, including cities with zero orders.

Key concepts: SELECT, WHERE, ORDER BY, LIMIT, GROUP BY and HAVING, Logical query order, Inner, left, full and cross joins, Anti-joins and semi-joins, NULL semantics, Data types for money and time, DDL and DML.

Mini project: Load a sample e-commerce dataset into PostgreSQL. Write 15 queries of increasing difficulty: filters, aggregates, each join type, and an anti-join that finds customers who never ordered.

Self-check: Why does a LEFT JOIN followed by WHERE payments.status = 'success' drop orders with no payments, and how do you fix it?

Resources:
- [SQLBolt interactive lessons](https://sqlbolt.com/) (SQLBolt)
- [PostgreSQL tutorial](https://www.postgresql.org/docs/current/tutorial.html) (PostgreSQL)
- [SQL roadmap](https://roadmap.sh/sql) (roadmap.sh)
- [Mode SQL tutorial](https://mode.com/sql-tutorial/) (Mode)

### Advanced SQL: CTEs, Subqueries and Set Logic

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/advanced-sql

Write readable multi-step SQL with CTEs, correlated subqueries, set operations, CASE logic, date handling and deduplication patterns.

Real transformations are rarely one query. Advanced SQL is about breaking problems into steps and producing correct results on messy data.

#### Structuring queries
- **CTEs** (`WITH cleaned AS (...), daily AS (...) SELECT ...`) make each step named and testable. This is the style dbt models use.
- **Subqueries**: scalar, in `IN`/`EXISTS`, and correlated subqueries. Know when `EXISTS` is clearer than a join.
- **Recursive CTEs** for hierarchies such as category trees or employee managers.

#### Logic and reshaping
- `CASE WHEN` for bucketing and conditional aggregation: `SUM(CASE WHEN status = 'cancelled' THEN 1 ELSE 0 END)`.
- `UNION ALL` vs `UNION` (the latter deduplicates and costs more), `INTERSECT`, `EXCEPT`.
- Pivoting rows to columns with conditional aggregation.

#### Dates and strings
Truncating to day, week or month, generating a date spine to fill missing days, handling IST vs UTC, and string functions for cleaning (`TRIM`, `LOWER`, `REGEXP_REPLACE`).

#### Data engineering patterns
- **Deduplication**: keep the latest record per key (you will do this with window functions next).
- **Upserts**: `INSERT ... ON CONFLICT` in PostgreSQL, `MERGE` in warehouses.
- **Reconciliation**: comparing row counts and sums between source and target with `EXCEPT` or full outer joins.

#### Pitfalls
- Huge nested subqueries no one can read. Name steps with CTEs.
- Using `UNION` when you meant `UNION ALL`, silently removing legitimate duplicates.
- Date math in local time that breaks around midnight UTC.

You are ready to move on when you can produce a daily report with one row per day for the last 30 days, including days with zero orders, using a date spine and CTEs.

Key concepts: Common table expressions, Correlated subqueries and EXISTS, Recursive CTEs, CASE and conditional aggregation, UNION ALL, INTERSECT, EXCEPT, Date spines and time zones, MERGE and upserts, Source to target reconciliation.

Mini project: Write a reconciliation script in SQL that compares a source orders table with a copied target table and reports missing rows, extra rows and rows whose amount differs. Use CTEs and EXCEPT or a full outer join.

Self-check: When would you choose EXISTS over an INNER JOIN, and what problem does it avoid?

Resources:
- [PostgreSQL: WITH queries (CTEs)](https://www.postgresql.org/docs/current/queries-with.html) (PostgreSQL)
- [Mode SQL tutorial (advanced)](https://mode.com/sql-tutorial/) (Mode)
- [LeetCode Top SQL 50](https://leetcode.com/studyplan/top-sql-50/) (LeetCode)

### Window Functions

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/window-functions

Rank, deduplicate, compute running totals, compare rows with LAG and LEAD, and solve gaps-and-islands problems with window functions.

Window functions compute a value for each row using a set of related rows, without collapsing them like GROUP BY does. They are the most common topic in data engineering SQL rounds.

#### Syntax
`function() OVER (PARTITION BY ... ORDER BY ... ROWS BETWEEN ...)`
- **PARTITION BY** splits rows into groups (per customer, per city).
- **ORDER BY** defines order inside each group.
- The **frame** (`ROWS BETWEEN 6 PRECEDING AND CURRENT ROW`) controls which rows are included.

#### The functions you must know
- `ROW_NUMBER`, `RANK`, `DENSE_RANK`: know how each handles ties.
- `LAG` and `LEAD`: compare with previous or next row (days since last order).
- `SUM`, `AVG`, `COUNT` as windows: running totals and moving averages.
- `FIRST_VALUE`, `LAST_VALUE`, `NTILE`.

#### Classic patterns
- **Deduplicate**: `ROW_NUMBER() OVER (PARTITION BY order_id ORDER BY updated_at DESC) = 1` keeps the latest version of each record. You will use this in almost every pipeline.
- **Top N per group**: top 3 restaurants per city by orders.
- **Gaps and islands**: find streaks of consecutive active days by subtracting a row number from the date.
- **Sessionisation**: start a new session when the gap since the previous event exceeds 30 minutes.

#### Pitfalls
- `LAST_VALUE` returning the current row because the default frame ends at the current row.
- Non-deterministic ordering: ties in ORDER BY give different results between runs. Add a tiebreaker column.
- Filtering on a window result in WHERE; wrap it in a CTE or use `QUALIFY` where supported.

You are ready to move on when you can solve top-N-per-group, latest-record dedup and a consecutive-days streak problem in under ten minutes each.

Key concepts: PARTITION BY and ORDER BY, Window frames, ROW_NUMBER, RANK, DENSE_RANK, LAG and LEAD, Running totals and moving averages, Latest-record deduplication, Gaps and islands, Sessionisation, QUALIFY clause.

Mini project: Using a table of user login events, write queries for: the latest login per user, each user's longest streak of consecutive login days, 7-day moving average of daily active users, and sessions with a 30-minute inactivity gap.

Self-check: Two orders for the same customer have the same timestamp. How do ROW_NUMBER, RANK and DENSE_RANK each treat them, and why does that matter for deduplication?

Resources:
- [PostgreSQL tutorial: window functions](https://www.postgresql.org/docs/current/tutorial-window.html) (PostgreSQL)
- [PostgreSQL window function reference](https://www.postgresql.org/docs/current/functions-window.html) (PostgreSQL)
- [DataLemur SQL interview questions](https://datalemur.com/) (DataLemur)

### Query Plans, Indexes and Performance

core · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/query-plans

Read EXPLAIN output, understand scans, joins and sorts, and use indexes, statistics and query rewrites to make slow SQL fast.

Two queries that return the same rows can differ by 1000x in runtime. Knowing how the engine executes SQL is what separates a data engineer from someone who just writes queries.

#### Reading a plan
- `EXPLAIN` shows the plan; `EXPLAIN ANALYZE` runs it and shows actual times and row counts.
- Read from the innermost node outwards. Look for **sequential scans** on large tables, **estimated vs actual rows** that differ wildly, and expensive **sorts** or **hash** operations spilling to disk.

#### Join algorithms
- **Nested loop**: good when one side is tiny and the other is indexed.
- **Hash join**: builds a hash table on the smaller side; the workhorse for large joins.
- **Merge join**: both sides sorted on the key.
The same ideas reappear in Spark as broadcast and sort-merge joins.

#### Indexes in OLTP databases
- B-tree indexes speed up equality and range filters and joins on the indexed columns.
- Composite index column order matters (`(customer_id, created_at)` helps "orders for a customer by date").
- Indexes slow down writes and use space; add them for real query patterns.

#### Warehouse performance is different
Columnar warehouses rarely use B-tree indexes. Instead you rely on **partitioning, clustering or sort keys, pruning** and selecting fewer columns. `SELECT *` on BigQuery costs money because you pay per byte scanned.

#### Pitfalls
- Wrapping an indexed column in a function (`WHERE DATE(created_at) = ...`) so the index cannot be used.
- Stale statistics causing bad plans; run `ANALYZE`.
- Optimising a query without measuring before and after.

You are ready to move on when you can take a slow query, read its EXPLAIN ANALYZE output, name the bottleneck and show a measured improvement after a rewrite or index.

Key concepts: EXPLAIN and EXPLAIN ANALYZE, Sequential vs index scans, Nested loop, hash and merge joins, B-tree and composite indexes, Table statistics, Sargable predicates, Partition pruning in warehouses, Materialized views.

Mini project: Generate a 10 million row orders table in PostgreSQL. Write five slow queries, capture EXPLAIN ANALYZE for each, fix them with indexes or rewrites, and publish a before and after table of runtimes in your repo.

Self-check: A query filters WHERE DATE(created_at) = '2026-10-01' and ignores the index on created_at. Why, and how do you rewrite it?

Resources:
- [PostgreSQL: Using EXPLAIN](https://www.postgresql.org/docs/current/using-explain.html) (PostgreSQL)
- [PostgreSQL: Indexes](https://www.postgresql.org/docs/current/indexes.html) (PostgreSQL)
- [Use The Index, Luke](https://use-the-index-luke.com/) (Markus Winand)

### Transactional Databases as Sources

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/oltp-databases

Understand ACID transactions, isolation levels, replication and how to extract from production databases safely, including change data capture basics.

Most business data starts life in an OLTP database such as PostgreSQL or MySQL behind an app. You will extract from these systems constantly, so you need to know how they work and how not to hurt them.

#### Transactions and ACID
- **Atomicity**: all or nothing. **Consistency**: constraints hold. **Isolation**: concurrent transactions do not see each other's half-done work. **Durability**: committed data survives crashes.
- **Isolation levels** (read committed, repeatable read, serializable) decide what anomalies you can see. A long extraction query may see a different snapshot from a short one.

#### Extracting safely
- Never run heavy analytical queries on the primary database serving customers. Use a **read replica**.
- Extract in chunks by primary key or `updated_at` rather than one giant query.
- Coordinate with backend teams about indexes on the columns you filter by.

#### Ways to extract changes
- **Full snapshot**: simple, fine for small tables.
- **Incremental by timestamp**: needs a reliable `updated_at` and misses hard deletes.
- **Change data capture (CDC)**: read the database's write-ahead log (PostgreSQL WAL, MySQL binlog) to capture every insert, update and delete in order. Tools like Debezium do this. Covered more in the ingestion section.

#### Schema changes
Application teams add and rename columns without telling you. Build extractors that detect schema drift and alert rather than silently dropping data.

#### Pitfalls
- Locking a production table with a long-running query during peak hours (say, a sale day).
- Trusting `updated_at` when the app does not always set it.

You are ready to move on when you can explain to a backend engineer how you will extract their orders table every hour without affecting the app, and how you will capture deletes.

Key concepts: ACID properties, Isolation levels, Read replicas, Snapshot vs incremental extraction, Write-ahead log and binlog, Hard deletes and soft deletes, Schema drift.

Mini project: Run PostgreSQL in Docker with an orders table. Write an incremental extractor based on updated_at, then simulate an update, an insert and a hard delete. Document which changes your extractor caught and which it missed.

Self-check: Why does timestamp-based incremental extraction miss hard deletes, and what are two ways to handle them?

Resources:
- [PostgreSQL: Transaction isolation](https://www.postgresql.org/docs/current/transaction-iso.html) (PostgreSQL)
- [PostgreSQL documentation](https://www.postgresql.org/docs/current/) (PostgreSQL)
- [Debezium documentation](https://debezium.io/documentation/) (Debezium)

## Data Modeling

Design tables that are fast to query and hard to misuse: OLTP vs OLAP, normalization, dimensional models with star and snowflake schemas, slowly changing dimensions and modern alternatives.

### OLTP vs OLAP Workloads

core · beginner · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/oltp-vs-olap

Learn why transactional and analytical systems are designed differently, from row vs columnar storage to query patterns and modeling goals.

Data modeling decisions depend on the workload. An app database and an analytics warehouse look similar (tables, SQL) but are built for opposite jobs.

#### OLTP: online transaction processing
- Many small reads and writes: place an order, update a wallet balance.
- Needs low latency, strong consistency and many concurrent users.
- **Row-oriented storage** and **normalized** schemas avoid duplicated data and update anomalies.
- Examples: PostgreSQL, MySQL, Oracle behind an app.

#### OLAP: online analytical processing
- Few, large queries that scan millions of rows but only a few columns: revenue by state by month.
- Writes happen in bulk loads.
- **Columnar storage**, compression and parallel execution make scans fast.
- **Denormalized**, dimensional schemas make queries simple for analysts.
- Examples: Snowflake, BigQuery, Redshift, ClickHouse, Databricks SQL.

#### Why columnar is faster for analytics
If a table has 100 columns and your query needs 3, a columnar engine reads roughly 3 percent of the data. Values in one column are similar, so they compress well. This is also why Parquet, a columnar file format, matters.

#### HTAP and real-time analytics
Some systems blur the line (real-time OLAP stores like ClickHouse or Apache Pinot for user-facing dashboards). Know they exist; the core distinction still guides design.

#### Pitfalls
- Running analytics directly on the production OLTP database.
- Copying the app's normalized schema into the warehouse unchanged and expecting analysts to join 15 tables.

You are ready to move on when you can explain, using a Zomato-style order example, why the same data is stored differently in the app database and the warehouse.

Key concepts: OLTP characteristics, OLAP characteristics, Row vs columnar storage, Normalized vs denormalized, Real-time OLAP stores.

Mini project: Load the same 5 million row dataset into PostgreSQL and DuckDB. Run an aggregate over three columns in each and compare runtime. Write a short note explaining the difference using row vs columnar storage.

Self-check: Why does a columnar store make SELECT * expensive while making SELECT SUM(amount) cheap?

Resources:
- [BigQuery overview](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [DuckDB documentation](https://duckdb.org/docs/) (DuckDB)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Normalization and Relational Design

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/normalization

Design clean relational schemas with keys, constraints and normal forms, and know when to deliberately denormalize.

Normalization is the discipline of storing each fact once. It is essential for source systems and still shapes how you design staging layers and reason about warehouse tables.

#### Keys and relationships
- **Primary keys** uniquely identify rows; **natural keys** come from the business (PAN, GSTIN, order number), **surrogate keys** are generated integers or hashes.
- **Foreign keys** link tables; know one-to-one, one-to-many and many-to-many (via a bridge table).
- **Grain**: what one row represents. State it for every table you build.

#### Normal forms in practice
- **1NF**: atomic values, no repeating groups (no comma-separated phone numbers in one column).
- **2NF**: every non-key column depends on the whole key.
- **3NF**: non-key columns depend only on the key, not on other non-key columns (store city in an address table, not state and city repeated in orders).
Beyond 3NF (BCNF and higher) rarely matters day to day.

#### Why and when to denormalize
Normalized schemas avoid update anomalies but need many joins. Analytical models deliberately denormalize (copying customer city onto each order row) to make queries fast and simple, accepting duplication because data is loaded in batches, not updated by users.

#### Constraints
`NOT NULL`, `UNIQUE`, `CHECK` and foreign keys catch bad data at write time. Many warehouses do not enforce them, so you test them instead (dbt tests, later).

#### Pitfalls
- Not knowing a table's grain, leading to double counting in joins.
- Using natural keys that change (phone numbers, emails) as primary keys.

You are ready to move on when you can take a flat spreadsheet of college admissions and split it into a 3NF schema with keys, then explain which denormalized table you would build for reporting.

Key concepts: Primary, foreign and surrogate keys, Table grain, 1NF, 2NF, 3NF, Many-to-many bridge tables, Constraints, Deliberate denormalization, ER diagrams.

Mini project: Take a denormalized CSV of student course registrations and design a 3NF schema in PostgreSQL with keys and constraints. Draw an ER diagram (dbdiagram.io or draw.io) and commit it to your repo.

Self-check: What is the grain of an order_items table, and what goes wrong if you sum order-level delivery fees after joining to it?

Resources:
- [PostgreSQL: Constraints](https://www.postgresql.org/docs/current/ddl-constraints.html) (PostgreSQL)
- [Database normalization](https://en.wikipedia.org/wiki/Database_normalization) (Wikipedia)
- [PostgreSQL DBA roadmap](https://roadmap.sh/postgresql-dba) (roadmap.sh)

### Dimensional Modeling: Star and Snowflake Schemas

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/dimensional-modeling

Model analytical data with Kimball-style fact and dimension tables, choose the grain, and decide between star and snowflake schemas.

Dimensional modeling, popularised by Ralph Kimball, is still the most common way to structure warehouse data for analysis. Interviewers love asking you to design one.

#### Facts and dimensions
- **Fact tables** store measurable events at a declared grain: one row per order line, per payment, per app session. They hold numeric **measures** (amount, quantity) and foreign keys to dimensions.
- **Dimension tables** describe the who, what, where, when: customer, product, restaurant, date, city.
- **Date dimension**: one row per day with attributes like weekday, month, fiscal quarter (April to March in India) and festival flags such as Diwali sale days.

#### The four-step design process
1. Pick the business process (orders, payments, deliveries).
2. Declare the grain (one row per order item).
3. Identify the dimensions.
4. Identify the facts (measures).

#### Star vs snowflake
- **Star schema**: each dimension is one wide, denormalized table joined directly to the fact. Simpler and usually faster.
- **Snowflake schema**: dimensions are normalized into sub-tables (product, category, department). Less duplication, more joins.
Most modern teams prefer stars because storage is cheap and analysts want fewer joins.

#### Fact table types
- **Transaction** facts: one row per event.
- **Periodic snapshot**: one row per entity per period (account balance per day).
- **Accumulating snapshot**: one row per process instance updated as it moves (order placed, picked, shipped, delivered).
Also know additive, semi-additive (balances) and non-additive (ratios) measures.

#### Pitfalls
- Mixing grains in one fact table (order-level and item-level rows together).
- Summing semi-additive measures like balances across time.

You are ready to move on when you can design a star schema for a quick commerce company (Blinkit-style) with a clearly stated grain, three dimensions and the measures, and justify each choice.

Key concepts: Fact and dimension tables, Declaring the grain, Date dimension, Star schema, Snowflake schema, Transaction, periodic and accumulating facts, Additive vs semi-additive measures, Conformed dimensions and bus matrix, Factless facts and junk dimensions.

Mini project: Design and build a star schema in DuckDB or PostgreSQL for a sample e-commerce dataset: fct_order_items, dim_customer, dim_product, dim_date. Write five business queries against it and document the grain of every table.

Self-check: A product belongs to a category which belongs to a department. Show how this looks in a star schema and in a snowflake schema, and argue for one.

Resources:
- [Kimball dimensional modeling techniques](https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/) (Kimball Group)
- [dbt best practices](https://docs.getdbt.com/best-practices) (dbt Labs)
- [Star schema](https://en.wikipedia.org/wiki/Star_schema) (Wikipedia)

### Slowly Changing Dimensions

core · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/slowly-changing-dimensions

Track how dimension attributes change over time with SCD Types 0, 1, 2 and others, and implement Type 2 history correctly.

Customers move cities, products change price categories, sellers switch plans. If your dimension simply overwrites the value, last year's report suddenly shows this year's attributes. Slowly changing dimension (SCD) techniques fix that.

#### The common types
- **Type 0**: never change (date of birth, original signup channel).
- **Type 1**: overwrite. No history. Fine for typo fixes.
- **Type 2**: add a new row for each change with `valid_from`, `valid_to` and an `is_current` flag. Full history; the fact joins to the version valid at event time.
- **Type 3**: keep a "previous value" column. Limited history.
- **Type 4 and 6**: history tables and hybrids; know the names, rarely needed.

#### Implementing Type 2
1. Compare incoming records with current dimension rows on the natural key.
2. For changed rows, close the old version (`valid_to = change_time`, `is_current = false`).
3. Insert the new version with a new surrogate key.
4. Facts store the surrogate key of the version current when the event happened.
In SQL this is usually a `MERGE` statement. In dbt, **snapshots** implement it for you.

#### Choosing per column
Decide type per attribute, not per table. A seller's GSTIN correction might be Type 1 while their city is Type 2.

#### Pitfalls
- Overlapping or gapped validity ranges caused by timezone or boundary errors (use half-open ranges: `valid_from <= t < valid_to`).
- Joining facts to the current dimension row when you needed the historical one.
- Creating a new version on every load because of a meaningless change like a trailing space.

You are ready to move on when you can write a MERGE (or dbt snapshot) that maintains a Type 2 customer dimension and a query that reports orders by the customer's city at the time of each order.

Key concepts: SCD Type 0 and Type 1, SCD Type 2, SCD Type 3, Types 4 and 6, valid_from, valid_to, is_current, MERGE-based implementation, Point-in-time joins.

Mini project: Build a Type 2 customer dimension in PostgreSQL or DuckDB. Load three daily snapshots where some customers change city, run your MERGE each day, and verify there are no overlapping validity ranges.

Self-check: A customer moved from Pune to Bengaluru in June. How does a Type 1 vs Type 2 dimension change the answer to 'revenue from Pune customers in Q1'?

Resources:
- [dbt snapshots](https://docs.getdbt.com/docs/build/snapshots) (dbt Labs)
- [Kimball dimensional modeling techniques](https://www.kimballgroup.com/data-warehouse-business-intelligence-resources/kimball-techniques/dimensional-modeling-techniques/) (Kimball Group)
- [Slowly changing dimension](https://en.wikipedia.org/wiki/Slowly_changing_dimension) (Wikipedia)

### Modern Modeling Approaches

optional · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/modern-modeling

Know the alternatives to classic Kimball: Data Vault, one big table, wide denormalized marts, activity schema and the layered staging to marts approach used with dbt.

Kimball is not the only option, and modern warehouses have changed some trade-offs. You should recognise the main approaches and pick pragmatically.

#### Layered modeling (the dbt way)
Most teams today organise transformations in layers:
- **Staging**: one model per source table, light cleaning and renaming, same grain as source.
- **Intermediate**: reusable joins and business logic.
- **Marts**: facts, dimensions and wide tables shaped for consumers (finance, growth, ops).
This maps neatly onto bronze, silver and gold.

#### One Big Table (OBT)
A single very wide, denormalized table per use case (every order with all customer and restaurant attributes). Columnar storage makes wide tables cheap to query. Great for BI tools; risky if it becomes the only model and logic gets duplicated.

#### Data Vault
Hubs (business keys), links (relationships) and satellites (attributes with history). Built for auditability and integrating many changing sources, common in banks and large enterprises. More tables and more complexity; usually a layer beneath dimensional marts.

#### Other ideas worth knowing
- **Inmon** approach: a normalized enterprise warehouse feeding departmental marts.
- **Activity schema**: one narrow table of customer activities.
- **Semantic layers** (dbt Semantic Layer, LookML) that define metrics once.

#### Pitfalls
- Picking Data Vault for a small startup because it sounds enterprise-grade.
- Copying metric logic into dozens of OBTs until no two dashboards agree.

You are ready to move on when you can explain to a hiring manager which modeling approach you would choose for a 20-person startup versus a large bank, and why.

Key concepts: Staging, intermediate, marts, One Big Table, Data Vault hubs, links, satellites, Inmon vs Kimball, Semantic layers and metrics, Activity schema.

Mini project: Take your star schema and build an OBT on top of it for a 'daily orders dashboard'. Write a short README comparing query simplicity, storage and risk of logic duplication between the two.

Self-check: What problem is Data Vault designed to solve, and why is it usually not what analysts query directly?

Resources:
- [How we structure our dbt projects](https://docs.getdbt.com/best-practices/how-we-structure/1-guide-overview) (dbt Labs)
- [Data vault modeling](https://en.wikipedia.org/wiki/Data_vault_modeling) (Wikipedia)
- [dbt best practices](https://docs.getdbt.com/best-practices) (dbt Labs)

## Storage, File Formats and Data Layout

Choose the right file format, compression and layout in object storage. These choices decide how fast and how cheap every downstream query will be.

### Row-Based Formats: CSV and JSON

core · beginner · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/row-formats

Handle CSV and JSON correctly, including delimiters, quoting, encodings, nested data and JSON Lines, and know when they are the wrong choice.

CSV and JSON are how most data arrives: exports from partners, API responses, log files. They are human-readable and universal, and they cause a surprising number of production bugs.

#### CSV
- There is a loose standard (RFC 4180) but every tool interprets it slightly differently.
- Watch for **delimiters** inside values (addresses with commas), **quoting and escaping**, **embedded newlines**, **headers** and **encodings** (UTF-8 vs Windows-1252; Hindi or Tamil names turning into garbage).
- CSV has no types. Everything is text until you parse it, so dates like 03/04/2026 are ambiguous (March or April?).

#### JSON and JSON Lines
- JSON supports nesting (an order with an array of items) and basic types.
- **JSON Lines** (one object per line) is splittable and streamable, unlike one giant JSON array.
- Nested data must be **flattened** or **exploded** for tables: one order row with three items becomes three item rows.

#### When they are the wrong choice
For storage and analytics, row text formats are large, slow to scan and lack schemas. Convert to a columnar format like Parquet as early as possible, while keeping the raw files for replay.

#### Compression
Gzip shrinks text a lot but a single gzipped file cannot be split across workers. Prefer many moderately sized files or splittable codecs.

#### Pitfalls
- Opening a CSV in Excel and saving it, which mangles dates, leading zeros and long IDs.
- Assuming every row has the same JSON keys. Missing keys and type changes (string vs number) are common.

You are ready to move on when you can load a messy partner CSV with quoted commas, a non-UTF-8 encoding and ambiguous dates without losing or corrupting a single row, and flatten a nested JSON order into item rows.

Key concepts: CSV quoting and delimiters, Character encodings, JSON types and nesting, JSON Lines, Flattening and exploding arrays, Splittable vs non-splittable compression, XML and fixed-width files.

Mini project: Create a deliberately messy CSV (quoted commas, newlines inside fields, Hindi names, mixed date formats) and a nested JSON order file. Write a Python loader that parses both correctly into clean tables and logs any rejected rows.

Self-check: Why is one 10 GB gzipped CSV harder for a distributed engine to process than one hundred 100 MB files?

Resources:
- [RFC 4180: CSV format](https://www.rfc-editor.org/rfc/rfc4180) (IETF)
- [JSON Lines](https://jsonlines.org/) (jsonlines.org)
- [Introducing JSON](https://www.json.org/json-en.html) (json.org)

### Columnar Formats: Parquet and ORC

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/parquet

Understand how Parquet stores data in row groups and column chunks, why it is fast and small, and how to write it well.

Parquet is the default file format of the modern data stack. Spark, warehouses, lakehouse table formats, DuckDB and pandas all read it natively.

#### How Parquet works
- A file is split into **row groups** (for example 128 MB each). Inside each row group, data is stored **column by column** in column chunks, split into pages.
- Each column chunk has **statistics** (min, max, null count). Engines skip row groups whose stats rule them out: this is **predicate pushdown**.
- Only the columns you select are read: **column pruning**.
- Similar values sit together, so **encodings** (dictionary, run-length) and **compression** (Snappy, Zstd) work very well.
- The **schema** is embedded in the file, with real types including nested structs and lists.

#### Writing good Parquet
- Aim for files of roughly 128 MB to 1 GB. Thousands of tiny files kill performance (the "small files problem").
- Sort or cluster by commonly filtered columns so min and max stats are useful.
- Choose Snappy for speed or Zstd for a better size ratio.
- Use proper types: dates as dates, decimals for money, not everything as strings.

#### ORC
ORC is a similar columnar format from the Hive world. Same ideas; Parquet has wider support today.

#### Pitfalls
- Writing one file per record in a streaming job and ending up with millions of tiny files.
- Schema mismatch across files (an `amount` column as int in some files and string in others).
- Treating Parquet files as updatable. They are immutable; updates need a table format (Delta, Iceberg).

You are ready to move on when you can convert a CSV dataset to Parquet, inspect its row groups and statistics with pyarrow or DuckDB, and show a measured speed and size difference for a filtered query.

Key concepts: Row groups, column chunks, pages, Column pruning, Predicate pushdown and statistics, Encodings and compression codecs, Target file sizes, Nested types, ORC, Apache Arrow in-memory format.

Mini project: Convert a 1 to 5 GB CSV dataset to Parquet with Snappy and Zstd. Record file sizes, then time the same filtered aggregate in DuckDB over CSV and both Parquet versions. Print row group stats with pyarrow.

Self-check: A query filters on order_date but still reads every row group. What about how the data was written could cause that?

Resources:
- [Apache Parquet documentation](https://parquet.apache.org/docs/) (Apache Parquet)
- [Apache Arrow Python docs](https://arrow.apache.org/docs/python/) (Apache Arrow)
- [DuckDB documentation](https://duckdb.org/docs/) (DuckDB)

### Avro and Schema Evolution

recommended · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/avro-schema-evolution

Use Avro for row-oriented, schema-first data in streaming and messaging, and learn the rules for evolving schemas without breaking consumers.

Avro is a compact binary row format with a schema written in JSON. It shines where records are written one at a time and read by many independent consumers, which is why it is popular with Kafka.

#### Avro basics
- Every record follows a **schema** (record name, fields, types, defaults).
- Data is binary and compact; the schema travels with the file or is stored in a **schema registry** and referenced by ID.
- Good for write-heavy, row-at-a-time workloads; Parquet is better for analytical scans.

#### Schema evolution
Producers and consumers upgrade at different times, so schemas must change safely.
- **Backward compatible**: new readers can read old data (adding a field with a default).
- **Forward compatible**: old readers can read new data (removing an optional field).
- **Full**: both.
Safe changes: add optional fields with defaults. Risky changes: renaming fields, changing types, removing required fields.

#### Schema evolution beyond Avro
Parquet and table formats (Delta, Iceberg) also support evolution such as adding columns. Iceberg tracks columns by ID so renames are safe. Protobuf is another schema-first format common in microservices.

#### Data contracts
The idea that producers publish an agreed schema and semantics, and changes go through review, grew out of these problems. You will meet it again in the data quality section.

#### Pitfalls
- Changing a field from int to string in production and breaking every downstream consumer.
- Adding a required field without a default, making old records unreadable.

You are ready to move on when you can write an Avro schema for a payment event, evolve it by adding a field safely, and explain which change would break backward compatibility.

Key concepts: Avro schemas and types, Binary encoding, Backward and forward compatibility, Schema registry, Protobuf, Avro vs Parquet.

Mini project: Using the fastavro Python library, write payment events with schema v1, then evolve to v2 by adding an optional upi_app field with a default. Show that a v2 reader can read v1 files and document one change that would break compatibility.

Self-check: Why is adding a field with a default backward compatible, while renaming a field is not?

Resources:
- [Apache Avro documentation](https://avro.apache.org/docs/) (Apache Avro)
- [Confluent documentation (Schema Registry)](https://docs.confluent.io/) (Confluent)
- [Protocol Buffers overview](https://protobuf.dev/overview/) (Google)

### Object Storage, Partitioning and Data Lake Layout

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/object-storage-layout

Organise data in S3, GCS or ADLS with sensible paths, Hive-style partitions, file sizing and lifecycle rules so data lakes do not become data swamps.

Object storage (Amazon S3, Google Cloud Storage, Azure Data Lake Storage) is the cheap, durable foundation of most data platforms. How you lay out files there decides query speed and cost.

#### Object storage basics
- Buckets and keys, not real folders. "Directories" are prefixes.
- Extremely durable and cheap per GB, but each request has latency and cost, so many tiny files are expensive.
- Storage classes (standard, infrequent access, archive) and **lifecycle rules** move or delete old data automatically.

#### Partitioning
- **Hive-style partitions** put column values in the path: `s3://lake/silver/orders/dt=2026-10-24/`.
- Engines skip partitions that do not match the filter (**partition pruning**).
- Partition on columns that queries filter by and that have **low to moderate cardinality**: date is the classic choice. Partitioning by `customer_id` creates millions of tiny folders.

#### Layout conventions
- Separate zones: `raw/` (landing, immutable), `bronze/`, `silver/`, `gold/` or similar.
- Include source and table in the path, and write each run to a deterministic location so reruns overwrite rather than duplicate.
- Compact small files periodically.

#### Security
Block public access, use IAM roles rather than access keys in code, enable encryption and versioning on critical buckets.

#### Pitfalls
- Over-partitioning (by date and hour and city) leading to thousands of tiny files per day.
- Public buckets leaking customer data; this has caused real Indian data breaches.
- Listing millions of objects in a prefix on every job run.

You are ready to move on when you can design the folder and partition layout for an orders lake, justify the partition column, and explain how a rerun of yesterday's job avoids creating duplicates.

Key concepts: Buckets, keys and prefixes, Hive-style partitioning, Partition column choice, Small files problem and compaction, Zones: raw, bronze, silver, gold, Lifecycle rules and storage classes, Bucket security and encryption.

Mini project: Using MinIO in Docker (S3-compatible) or a free-tier S3 bucket, write a dataset partitioned by date. Query it with DuckDB with and without a date filter, and compare how many files are read.

Self-check: Why is partitioning a table by user_id usually a bad idea, and what would you do instead to speed up per-user queries?

Resources:
- [Amazon S3 documentation](https://docs.aws.amazon.com/s3/) (AWS)
- [Google Cloud Storage documentation](https://cloud.google.com/storage/docs) (Google Cloud)
- [BigQuery partitioned tables](https://cloud.google.com/bigquery/docs/partitioned-tables) (Google Cloud)

## Batch Processing with Apache Spark

When data no longer fits on one machine, distribute the work. Learn how distributed processing works, then use PySpark to build, join and tune large batch jobs.

### Distributed Processing Concepts

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/distributed-processing

Understand partitioning, parallelism, shuffles, data locality and fault tolerance, the ideas behind MapReduce, Spark and every distributed engine.

Before writing Spark code, understand what any distributed engine is doing. These concepts explain almost every performance problem you will debug.

#### Splitting the work
- Data is divided into **partitions**; each partition is processed by a task on a worker in parallel.
- **Narrow** operations (filter, map, select) work on each partition independently.
- **Wide** operations (groupBy, join, distinct, orderBy) need rows with the same key on the same machine, so data is redistributed across the network: a **shuffle**. Shuffles are the main cost in big data jobs.

#### MapReduce, briefly
The original Hadoop model: map (emit key-value pairs), shuffle (group by key), reduce (aggregate). Spark generalised this with in-memory processing and a richer API. You do not need to write MapReduce, but the mental model helps.

#### Skew
If one key has far more rows than others (one huge seller on Diwali, or a NULL key), one task does most of the work while others sit idle. Skew is the most common cause of a job stuck at 199 of 200 tasks.

#### Fault tolerance
Machines fail. Engines track **lineage** (how each partition was computed) so a lost partition can be recomputed, and write intermediate shuffle data to disk.

#### Scale up vs scale out
One big machine with DuckDB often beats a small cluster for data under a few hundred GB. Distributed systems add overhead; use them when the data or deadline really requires it.

#### Pitfalls
- Reaching for Spark for a 2 GB file.
- Assuming more machines always means faster; shuffles and skew can make it slower.

You are ready to move on when you can look at a pipeline (filter, join, group by, sort) and say which steps shuffle, where skew might hit, and whether it even needs a cluster.

Key concepts: Partitions and tasks, Narrow vs wide transformations, Shuffles, Data skew, MapReduce model, Lineage and fault tolerance, Scale up vs scale out, Hadoop HDFS and YARN history.

Mini project: Write a word count in plain Python that simulates map, shuffle and reduce across four 'workers' (lists). Then introduce a skewed key and show how the work distribution changes.

Self-check: Why does a groupBy cause a shuffle while a filter does not?

Resources:
- [Spark cluster mode overview](https://spark.apache.org/docs/latest/cluster-overview.html) (Apache Spark)
- [MapReduce](https://en.wikipedia.org/wiki/MapReduce) (Wikipedia)
- [Data Engineering Zoomcamp (batch module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Spark Architecture and Execution Model

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/spark-architecture

Learn how Spark runs: driver and executors, lazy evaluation, jobs, stages and tasks, the Catalyst optimizer and how to read the Spark UI.

Apache Spark is the most widely used engine for large-scale batch processing and appears in most Indian data engineering job descriptions, often through Databricks, AWS EMR or GCP Dataproc.

#### The pieces
- **Driver**: runs your program, builds the plan and schedules work.
- **Executors**: JVM processes on worker nodes that run tasks and cache data.
- **Cluster manager**: YARN, Kubernetes or Spark standalone allocates resources. On Databricks this is managed for you.
- **SparkSession**: your entry point in PySpark.

#### Lazy evaluation
Transformations (`filter`, `select`, `join`) only build a plan. Nothing runs until an **action** (`count`, `show`, `write`, `collect`). This lets Spark optimise the whole pipeline at once.

#### Jobs, stages, tasks
- Each action triggers a **job**.
- A job is split into **stages** at shuffle boundaries.
- Each stage has one **task** per partition.
The **Spark UI** (port 4040 locally) shows all of this, plus shuffle sizes, task durations and spills. Learning to read it is essential.

#### Catalyst and Tungsten
The DataFrame API and Spark SQL go through the **Catalyst optimizer** (predicate pushdown, column pruning, join reordering) and **Tungsten** (efficient memory and code generation). This is why DataFrames are much faster than the old RDD API. **Adaptive Query Execution (AQE)** re-optimises at runtime using real statistics.

#### Pitfalls
- Calling `collect()` on a large DataFrame and crashing the driver.
- Using RDDs and Python UDFs where built-in DataFrame functions exist.
- Reading the code and assuming it runs line by line; it does not.

You are ready to move on when you can run a PySpark job locally, open the Spark UI, and explain how many jobs, stages and tasks it produced and why.

Key concepts: Driver, executors, cluster manager, SparkSession, Transformations vs actions, Jobs, stages, tasks, Spark UI, Catalyst optimizer, Adaptive Query Execution, RDD API.

Mini project: Install PySpark locally (or use Databricks Free Edition or Google Colab). Run a job that reads Parquet, filters, groups and writes output. Screenshot the Spark UI and annotate the stages, shuffle sizes and slowest task.

Self-check: You write ten transformations and then call count(). How many jobs run, and when does Spark actually read the data?

Resources:
- [Apache Spark documentation](https://spark.apache.org/docs/latest/) (Apache Spark)
- [Spark cluster mode overview](https://spark.apache.org/docs/latest/cluster-overview.html) (Apache Spark)
- [Spark web UI](https://spark.apache.org/docs/latest/web-ui.html) (Apache Spark)

### PySpark DataFrames

core · intermediate · about 12 h · https://www.internhack.in/roadmaps/tracks/data-engineer/pyspark-dataframes

Read, transform and write data with the PySpark DataFrame API: schemas, column expressions, aggregations, window functions and handling nested data.

The PySpark DataFrame API is what you will write daily. If you know SQL and pandas, most of it will feel familiar; the difference is that it runs across a cluster.

#### Reading and writing
- `spark.read.parquet(path)`, `.csv` with options, `.json`.
- Define **explicit schemas** (`StructType`) for CSV and JSON instead of `inferSchema`, which is slow and can guess wrong.
- Write with `.mode("overwrite")` and `.partitionBy("dt")`. Use **dynamic partition overwrite** so a rerun replaces only the affected dates.

#### Transformations
- `select`, `withColumn`, `filter`, `drop`, `distinct`, `dropDuplicates`.
- Functions from `pyspark.sql.functions` (`col`, `when`, `to_date`, `from_utc_timestamp`, `regexp_replace`).
- `groupBy().agg(...)` for aggregates.
- **Window functions** via `Window.partitionBy().orderBy()`, the same patterns you learned in SQL.
- Nested data: `explode` arrays, access struct fields with dot notation.

#### Spark SQL
Register a temp view and write plain SQL with `spark.sql(...)`. DataFrame code and SQL compile to the same plan, so use whichever is clearer.

#### UDFs
Python UDFs are slow because rows move between the JVM and Python. Prefer built-in functions; if you must, use **pandas UDFs** (vectorised).

#### Testing
Write transformations as functions that take and return DataFrames, and test them with tiny DataFrames in pytest.

#### Pitfalls
- Using `inferSchema` in production and getting a type change one day.
- Overwrite mode wiping the whole table when you meant to replace one partition.
- Chaining hundreds of `withColumn` calls in a loop, which bloats the plan.

You are ready to move on when you can rebuild your earlier pandas cleaning job in PySpark with an explicit schema, a window-based dedup and partitioned output, plus pytest tests.

Key concepts: Reading and writing formats, Explicit schemas with StructType, Column expressions and functions, groupBy and agg, Window functions in PySpark, explode and nested structs, Spark SQL and temp views, Dynamic partition overwrite, pandas UDFs, Testing PySpark code.

Mini project: Using the NYC taxi dataset (used in the DE Zoomcamp) or a large Indian open dataset, build a PySpark job that cleans trips, deduplicates, computes daily metrics per zone with window functions, and writes partitioned Parquet. Include pytest tests for two transformations.

Self-check: Why is a Python UDF that uppercases a string slower than F.upper(), and what happens to the data when the UDF runs?

Resources:
- [PySpark documentation](https://spark.apache.org/docs/latest/api/python/index.html) (Apache Spark)
- [Spark SQL, DataFrames and Datasets guide](https://spark.apache.org/docs/latest/sql-programming-guide.html) (Apache Spark)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Joins and Shuffles in Spark

core · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/spark-joins

Choose and control join strategies in Spark: broadcast hash joins, sort-merge joins, handling skewed keys and reducing shuffle volume.

Joins are where most Spark jobs spend their time and where most of them fail. Interviewers for Spark roles ask about join strategies almost every time.

#### Join strategies
- **Broadcast hash join**: the small table is copied to every executor, so the large table does not shuffle. Ideal for joining a huge fact (orders) to a small dimension (cities). Spark does this automatically under `spark.sql.autoBroadcastJoinThreshold`, or you can hint with `broadcast(df)`.
- **Sort-merge join**: both sides are shuffled by key and sorted, then merged. The default for two large tables.
- **Shuffle hash join**: a middle option, less common.
Check the plan with `df.explain()` to see which one Spark chose.

#### Handling skew
- Find skew: in the Spark UI one task is far slower and processes far more data.
- **AQE skew join** handling splits skewed partitions automatically when enabled.
- **Salting**: add a random suffix to the hot key on the large side and replicate the small side, spreading one key over many tasks.
- Filter or handle NULL keys separately; they often form one giant skewed partition.

#### Reducing shuffle
- Filter and select columns **before** joining.
- Aggregate before joining when possible.
- Tune `spark.sql.shuffle.partitions` (default 200) to the data size, or let AQE coalesce partitions.
- Bucketing tables on the join key avoids repeated shuffles for frequent joins.

#### Pitfalls
- Broadcasting a table that is too large and causing out-of-memory errors.
- Joins that explode row counts because the key is not unique on the side you assumed.

You are ready to move on when you can force a broadcast join and a sort-merge join on the same data, compare their plans and runtimes, and fix a deliberately skewed join with salting or AQE.

Key concepts: Broadcast hash join, Sort-merge join, Reading explain() output, Detecting skew in the Spark UI, Salting skewed keys, AQE skew handling, shuffle.partitions tuning, Bucketing.

Mini project: Generate a skewed orders dataset where one seller has 30 percent of rows. Join it to a sellers table three ways (default, broadcast, salted) and record runtimes and Spark UI task distributions in a short write-up.

Self-check: Your join stage has 199 tasks finishing in 10 seconds and one running for 40 minutes. What is happening and what are two fixes?

Resources:
- [Spark SQL performance tuning](https://spark.apache.org/docs/latest/sql-performance-tuning.html) (Apache Spark)
- [Spark SQL, DataFrames and Datasets guide](https://spark.apache.org/docs/latest/sql-programming-guide.html) (Apache Spark)
- [Spark web UI](https://spark.apache.org/docs/latest/web-ui.html) (Apache Spark)

### Spark Performance Tuning and Operations

recommended · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/spark-tuning

Size clusters and executors, manage memory, cache wisely, control output file counts and debug common Spark failures in production.

A Spark job that works on a sample can fail or cost a fortune on full data. Tuning is about measuring, finding the bottleneck and changing one thing at a time.

#### Resources and memory
- Executor count, cores per executor and memory per executor decide parallelism. A common start is 4 to 5 cores per executor.
- Executor memory is split between execution (shuffles, joins, sorts) and storage (cache). When execution memory runs out, Spark **spills** to disk; too much spill means slow jobs or out-of-memory errors.
- Driver memory matters when you collect results or broadcast tables.

#### Caching
`cache()` or `persist()` helps only when a DataFrame is reused by several actions. Caching everything wastes memory. Unpersist when done.

#### Output files
- `repartition(n)` does a full shuffle to n partitions; `coalesce(n)` reduces partitions without a full shuffle.
- Control output so each partition folder gets a sensible number of reasonably sized files.

#### Common failures and what they mean
- **OutOfMemoryError on executors**: skew, huge partitions or too-large broadcasts.
- **OutOfMemoryError on the driver**: `collect()` or `toPandas()` on big data.
- **Stage stuck on one task**: skew.
- **Too many small files**: over-partitioned writes.
- **Lost executors**: spot instance reclaimed or memory overhead too low.

#### Cost awareness
On Databricks, EMR or Dataproc, idle clusters burn money. Use autoscaling, auto-termination, job clusters instead of always-on clusters, and spot instances for fault-tolerant batch.

#### Pitfalls
- Copy-pasting tuning configs from blogs without measuring.
- Increasing memory to hide skew instead of fixing it.

You are ready to move on when you can take a failing or slow Spark job, use the Spark UI to name the cause (skew, spill, small files, driver collect), fix it and show the before and after.

Key concepts: Executor sizing, Memory model and spills, cache and persist, repartition vs coalesce, Diagnosing OOM errors, Autoscaling and spot instances, Managed Spark: Databricks, EMR, Dataproc.

Mini project: Take your PySpark taxi job and make it intentionally bad (collect, no filters, 2000 shuffle partitions, cache everything). Then fix it step by step, logging runtime, shuffle size and output file count after each change.

Self-check: What is the difference between repartition(10) and coalesce(10), and when would you choose each before writing output?

Resources:
- [Tuning Spark](https://spark.apache.org/docs/latest/tuning.html) (Apache Spark)
- [Spark configuration](https://spark.apache.org/docs/latest/configuration.html) (Apache Spark)
- [Spark SQL performance tuning](https://spark.apache.org/docs/latest/sql-performance-tuning.html) (Apache Spark)

## Cloud Warehouses and Lakehouses

Learn how cloud data warehouses work, go deep on one of Snowflake, BigQuery or Redshift, and understand open table formats like Delta Lake and Apache Iceberg that power the lakehouse.

### How Cloud Data Warehouses Work

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/warehouse-concepts

Understand MPP execution, separation of storage and compute, micro-partitions and clustering, loading patterns and the pricing models that shape design.

Cloud warehouses are where most modeled data ends up. They look like normal SQL databases, but their internals explain both their speed and their bills.

#### Architecture
- **MPP (massively parallel processing)**: a query is split across many compute nodes, each scanning part of the data.
- **Columnar, compressed storage** in the cloud provider's object store.
- **Separation of storage and compute**: storage is cheap and shared; compute (warehouses, slots, clusters) scales independently and can be paused.

#### Organising data inside the warehouse
- **Partitioning** (BigQuery by date, for example) and **clustering or sort keys** keep related rows together so the engine can prune.
- Metadata such as min and max per block lets queries skip most data when filters match the layout.
- Databases, schemas, tables, views and **materialized views**.

#### Loading data
- Bulk loads from object storage (`COPY INTO`, load jobs) are cheap and fast.
- Row-by-row `INSERT` is slow and expensive; batch it.
- Streaming ingestion exists but usually costs more.
- External tables let you query files in the lake without loading them.

#### Pricing models
- **On-demand per bytes scanned** (BigQuery default): selecting fewer columns and filtering on partitions saves money directly.
- **Compute time** (Snowflake credits, Redshift node hours): idle or oversized warehouses waste money.
Always check cost before running a big query on a company account.

#### Pitfalls
- `SELECT *` on a multi-terabyte table "just to look". Use previews and LIMIT does not always reduce scan cost.
- Leaving a large compute cluster running overnight.
- Treating the warehouse like OLTP with frequent single-row updates.

You are ready to move on when you can explain why a BigQuery query filtered on the partition column costs less, and why a Snowflake warehouse left running at night costs money even with no queries.

Key concepts: MPP execution, Storage and compute separation, Partitioning and clustering, Bulk loading with COPY, External tables, Materialized views, Pricing models.

Mini project: Using the BigQuery sandbox (free, no card), query a public dataset twice: once with SELECT * and once with only needed columns and a partition filter. Record bytes processed for each and explain the difference.

Self-check: Why does adding LIMIT 10 to a BigQuery query often not reduce the bytes billed?

Resources:
- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [Snowflake documentation](https://docs.snowflake.com/) (Snowflake)
- [Amazon Redshift documentation](https://docs.aws.amazon.com/redshift/) (AWS)

### Snowflake

recommended · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake

Go deep on Snowflake: virtual warehouses, micro-partitions, stages and COPY, time travel, zero-copy cloning, roles and cost controls.

Snowflake is a popular cloud warehouse with many Indian GCCs, consultancies and product companies. Pick it if your target companies list it, or if you like a clean SQL-first experience. A 30-day free trial is available.

#### Core concepts
- **Virtual warehouses**: independent compute clusters sized XS to 6XL. They auto-suspend and auto-resume; you pay credits only while running.
- **Micro-partitions**: Snowflake automatically splits tables into small immutable chunks with metadata. Add **clustering keys** only for very large tables with clear filter patterns.
- **Databases and schemas** organise objects; **roles** (RBAC) control access.

#### Loading
- **Stages** (internal or external on S3, GCS, Azure) hold files.
- `COPY INTO table FROM @stage` bulk loads Parquet, CSV or JSON.
- **Snowpipe** loads continuously as files arrive.
- `VARIANT` columns store semi-structured JSON queryable with path syntax.

#### Features worth knowing
- **Time Travel**: query or restore data as it was hours or days ago.
- **Zero-copy cloning**: clone a database instantly for testing without duplicating storage.
- **Streams and tasks**: track changes and schedule SQL inside Snowflake.
- **Secure data sharing** across accounts.

#### Cost control
Set auto-suspend to 60 seconds, use **resource monitors** to cap credits, size warehouses to the workload and separate warehouses for loading, transformation and BI.

#### Pitfalls
- Using a large warehouse for small queries; bigger is not always faster for tiny data.
- Granting broad roles like ACCOUNTADMIN to everyone.

You are ready to move on when you can load Parquet from a stage, model a star schema, use Time Travel to undo a bad delete, and set a resource monitor on your trial account.

Key concepts: Virtual warehouses and credits, Micro-partitions and clustering keys, Stages and COPY INTO, Snowpipe, VARIANT and semi-structured data, Time Travel and cloning, Roles and RBAC, Resource monitors.

Mini project: On a Snowflake trial, create an external stage over sample Parquet files, load them with COPY INTO, build a small star schema, clone the database for a test, and demonstrate Time Travel recovery. Record credits used.

Self-check: Why might a query run in roughly the same time on a Small and a Large warehouse, and what does that tell you?

Resources:
- [Snowflake documentation](https://docs.snowflake.com/) (Snowflake)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Google BigQuery

alternative · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery

Go deep on BigQuery: serverless execution, slots and bytes-scanned pricing, partitioning and clustering, nested and repeated fields, and cost controls.

BigQuery is Google Cloud's serverless warehouse. There is no cluster to manage, and the free **sandbox** lets students practise without a credit card, which makes it the easiest warehouse to learn on.

#### Core concepts
- **Projects, datasets, tables**: the hierarchy for organising data and permissions.
- **Serverless execution** with **slots** (units of compute). On-demand pricing charges per TB scanned; capacity pricing reserves slots.
- **Partitioned tables** (by ingestion time, a date column or integer range) and **clustered tables** (sorted by up to four columns) reduce bytes scanned.

#### Working with data
- Load from Cloud Storage, stream with the Storage Write API, or query files directly as external tables.
- **Nested and repeated fields** (`STRUCT` and `ARRAY`) store an order with its items in one row; use `UNNEST` to flatten.
- Standard SQL with window functions, `QUALIFY`, `MERGE` and scripting.
- Public datasets are great for practice.

#### Cost control
- Always check the bytes estimate before running.
- Require partition filters on big tables.
- Set custom quotas and budget alerts.
- Avoid `SELECT *`; select columns.

#### Ecosystem
BigQuery pairs with Cloud Storage, Pub/Sub, Dataflow, Dataproc (managed Spark), Cloud Composer (managed Airflow) and Looker.

#### Pitfalls
- Assuming LIMIT reduces cost.
- Partitioning tables that are too small, or partitioning by a column queries never filter on.

You are ready to move on when you can load data into a partitioned and clustered table, query nested data with UNNEST, and show bytes scanned dropping because of your table design.

Key concepts: Projects, datasets, tables, Slots and on-demand pricing, Partitioned tables, Clustered tables, STRUCT, ARRAY and UNNEST, Public datasets and sandbox, Quotas and budget alerts, Storage Write API.

Mini project: In the BigQuery sandbox, load a CSV from Cloud Storage into a date-partitioned, clustered table. Write five analytical queries and record bytes processed for each with and without partition filters.

Self-check: When would you store order items as a repeated STRUCT inside the orders table instead of a separate order_items table?

Resources:
- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [BigQuery partitioned tables](https://cloud.google.com/bigquery/docs/partitioned-tables) (Google Cloud)
- [Data Engineering Zoomcamp (warehouse module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Amazon Redshift

alternative · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/redshift

Go deep on Redshift: provisioned and serverless options, distribution and sort keys, COPY from S3, Spectrum and workload management.

Amazon Redshift is AWS's data warehouse and is common in companies already built on AWS. Pick it if your target roles are AWS-heavy.

#### Deployment options
- **Provisioned clusters** with RA3 nodes (managed storage separate from compute).
- **Redshift Serverless**: pay for compute used, no cluster sizing. Easier for learning; check the free trial credits.

#### Table design matters more here
- **Distribution style** decides how rows spread across nodes: `KEY` (co-locate rows with the same join key), `ALL` (copy small dimensions to every node), `EVEN`, or `AUTO`.
- **Sort keys** order data on disk so range filters skip blocks (zone maps).
- Good choices avoid data movement during joins; poor ones cause slow, shuffle-heavy queries.
- Recent versions automate much of this (`AUTO` distribution and sort), but interviewers still ask.

#### Loading and querying
- `COPY` from S3 in parallel; split input into multiple files.
- **Redshift Spectrum** queries Parquet in S3 directly through the Glue Data Catalog.
- `VACUUM` and `ANALYZE` maintain sort order and statistics (largely automatic now).
- **Workload management (WLM)** and concurrency scaling manage many simultaneous queries.

#### Pitfalls
- Choosing a distribution key with skewed values, putting most data on one node.
- Loading with many single-row INSERTs instead of COPY.

You are ready to move on when you can design distribution and sort keys for a fact and two dimensions, load them with COPY from S3, and use EXPLAIN to confirm joins avoid redistribution.

Key concepts: Provisioned vs Serverless, Distribution styles, Sort keys and zone maps, COPY from S3, Redshift Spectrum, VACUUM and ANALYZE, Workload management.

Mini project: Using Redshift Serverless trial credits, load a star schema from S3 with COPY. Try two distribution designs for the fact table, run the same join query and compare EXPLAIN plans and runtimes. Pause or delete resources afterwards.

Self-check: Why would you use DISTSTYLE ALL for a small city dimension but not for the orders fact table?

Resources:
- [Amazon Redshift documentation](https://docs.aws.amazon.com/redshift/) (AWS)
- [AWS Skill Builder](https://skillbuilder.aws/) (AWS)

### Lakehouse Tables with Delta Lake

recommended · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/delta-lake

Add ACID transactions, schema enforcement, time travel and MERGE to files in object storage with Delta Lake, the table format behind Databricks.

Plain Parquet files in a lake cannot be updated safely: two jobs writing at once, or a job failing halfway, leave the data broken. **Open table formats** fix this, turning a folder of files into a real table. Delta Lake is the most common one in Spark-heavy and Databricks shops.

#### How it works
- Data stays as Parquet files.
- A **transaction log** (`_delta_log`) records every commit: which files were added or removed.
- Readers see a consistent **snapshot**; writers use optimistic concurrency.

#### What you get
- **ACID transactions** on object storage.
- **Schema enforcement and evolution**: bad writes are rejected; new columns can be added deliberately.
- **MERGE, UPDATE, DELETE**: upserts and GDPR or DPDP deletion requests become possible.
- **Time travel**: query `VERSION AS OF` or `TIMESTAMP AS OF`.
- **Change data feed** to read row-level changes downstream.

#### Maintenance
- `OPTIMIZE` compacts small files; **Z-ordering** or **liquid clustering** co-locates related data.
- `VACUUM` removes old files no longer referenced (this limits how far back time travel works).

#### Using it
Works with open source Spark (`delta-spark`), Databricks, and readers like DuckDB and Polars via delta-rs. The **medallion architecture** is usually implemented as Delta tables.

#### Pitfalls
- Running VACUUM with a very short retention and breaking long-running readers or time travel.
- Streaming jobs creating thousands of small files without regular OPTIMIZE.

You are ready to move on when you can create a Delta table with PySpark, MERGE daily updates into it, query an older version, and compact it with OPTIMIZE.

Key concepts: Transaction log, ACID on object storage, Schema enforcement and evolution, MERGE, UPDATE, DELETE, Time travel, OPTIMIZE and Z-order, VACUUM and retention, Change data feed.

Mini project: Build a bronze, silver, gold pipeline with PySpark and Delta Lake on your laptop: append raw orders to bronze, MERGE deduplicated records into silver, aggregate into gold. Demonstrate time travel to a previous version.

Self-check: Two jobs write to the same plain Parquet folder at once and one fails halfway. What can readers see, and how does Delta's transaction log prevent it?

Resources:
- [Delta Lake documentation](https://docs.delta.io/) (Delta Lake)
- [Medallion architecture](https://www.databricks.com/glossary/medallion-architecture) (Databricks)
- [Databricks documentation](https://docs.databricks.com/) (Databricks)

### Lakehouse Tables with Apache Iceberg

alternative · advanced · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/iceberg

Use Apache Iceberg, the engine-neutral open table format, for snapshots, hidden partitioning, partition evolution and multi-engine access.

Apache Iceberg solves the same problem as Delta Lake (reliable tables on object storage) with a strong focus on **engine neutrality**. Spark, Trino, Flink, Snowflake, BigQuery, Athena and DuckDB can all read and often write Iceberg tables, which is why it has become the standard many vendors support.

#### How it works
- A **catalog** (Hive Metastore, AWS Glue, REST catalog, Nessie, Polaris) points to the table's current **metadata file**.
- Metadata lists **snapshots**; each snapshot points to manifest lists and manifests that track data files with column statistics.
- Commits swap the metadata pointer atomically.

#### Standout features
- **Hidden partitioning**: define partitions as transforms (`days(order_ts)`, `bucket(16, user_id)`); queries filter on the original column and still prune.
- **Partition evolution**: change partitioning later without rewriting old data.
- **Schema evolution** tracked by column IDs, so renames and reorders are safe.
- **Time travel and rollback** using snapshots.
- **Row-level deletes** with copy-on-write or merge-on-read.

#### Maintenance
Expire old snapshots, rewrite (compact) small data files and remove orphan files, just like Delta's OPTIMIZE and VACUUM.

#### Delta or Iceberg?
Both are solid. Delta is the natural default on Databricks; Iceberg is popular on AWS (Athena, Glue, S3 Tables), Snowflake and multi-engine platforms. Learn one well and the other in an afternoon.

#### Pitfalls
- Forgetting snapshot expiry and letting metadata and storage grow forever.
- Mixing catalogs so different engines see different versions of the same table.

You are ready to move on when you can create an Iceberg table with hidden partitioning, query it from two engines (for example Spark and DuckDB or Trino), and evolve its partition spec.

Key concepts: Catalogs and metadata files, Snapshots and manifests, Hidden partitioning, Partition evolution, Copy-on-write vs merge-on-read, Snapshot expiry and compaction, Multi-engine access.

Mini project: Run Spark with an Iceberg catalog in Docker (or use AWS Athena with Glue). Create a table partitioned by days(order_ts), load data, change the partitioning to hours, add a column, and roll back to an earlier snapshot.

Self-check: What does hidden partitioning protect users from, compared with a Hive-style dt column they must filter on manually?

Resources:
- [Apache Iceberg documentation](https://iceberg.apache.org/docs/latest/) (Apache Iceberg)
- [Apache Iceberg](https://iceberg.apache.org/) (Apache Iceberg)
- [Amazon Athena documentation](https://docs.aws.amazon.com/athena/) (AWS)

## ELT and Transformation with dbt

Load first, transform in the warehouse. Learn ELT patterns, managed ingestion and change data capture, then build tested, documented transformation layers with dbt.

### ETL vs ELT and Load Patterns

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/etl-vs-elt

Understand why the industry moved from ETL to ELT, and master load patterns: full refresh, append, incremental, upsert, idempotency and backfills.

**ETL** (extract, transform, load) transforms data before it reaches the target, historically in tools like Informatica or SSIS. **ELT** loads raw data into a cheap, powerful warehouse or lakehouse first, then transforms it with SQL. Cloud warehouses made ELT the default.

#### Why ELT won
- Raw data is preserved, so you can rebuild when logic changes.
- SQL transformations are version-controlled, testable and readable by analysts.
- Warehouse compute scales on demand.
ETL still makes sense for heavy cleansing, PII masking before load, or streaming enrichment.

#### Load patterns
- **Full refresh**: drop and rebuild. Simple and correct; expensive for big tables.
- **Append-only**: add new rows (events, logs).
- **Incremental**: process only new or changed rows since the last run, using a watermark.
- **Upsert / MERGE**: insert new keys, update existing ones.
- **Partition overwrite**: recompute and replace whole date partitions; a robust middle ground.

#### Idempotency and backfills
A job is **idempotent** if running it twice for the same input gives the same result. This is the most important property of a pipeline: it lets you retry failures and **backfill** history (rerun for past dates) safely. Design every job around a logical date parameter and deterministic outputs.

#### Late-arriving data
Records sometimes arrive days late (offline POS terminals syncing). Reprocess a lookback window (say the last 3 days) on each run.

#### Pitfalls
- Append jobs that duplicate data when retried.
- Using `now()` inside transformations instead of the run's logical date, making backfills wrong.

You are ready to move on when you can take any pipeline you have built and prove it is idempotent by running it twice for the same date and showing identical output.

Key concepts: ETL vs ELT, Full refresh, Append-only loads, Incremental loads, Upsert and MERGE, Idempotency, Backfills, Late-arriving data.

Mini project: Write the same daily load three ways (full refresh, append, partition overwrite) against DuckDB or PostgreSQL. Run each twice for the same date and once for a backfill range, and document which ones stay correct.

Self-check: Your daily job failed after writing half its data and then succeeded on retry. How do you know whether the table now contains duplicates, and how should it have been designed?

Resources:
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [Airflow best practices (idempotency)](https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html) (Apache Airflow)
- [dbt incremental models](https://docs.getdbt.com/docs/build/incremental-models) (dbt Labs)

### Managed Ingestion and Change Data Capture

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/ingestion-cdc

Use connectors (Airbyte, Fivetran, dlt) to load SaaS and database sources, and capture database changes with log-based CDC tools like Debezium.

Writing a custom extractor for every source does not scale. Most teams use ingestion tools for common sources and save custom code for the unusual ones.

#### Managed and open source connectors
- **Fivetran**, **Airbyte**, **Stitch** and similar tools provide hundreds of connectors (Postgres, MySQL, Salesforce, Google Ads, Shopify) that land data in your warehouse with schema handling and incremental syncs.
- **dlt** (data load tool) is a Python library for writing your own pipelines with schema inference and incremental loading built in.
- Trade-offs: speed of setup vs cost (often per row synced) vs control.

#### Change data capture
Log-based CDC reads the database's transaction log and emits every insert, update and delete as an event.
- **Debezium** connects to PostgreSQL, MySQL, MongoDB and others and publishes changes to Kafka.
- Benefits: captures deletes, low load on the source, near real-time, ordered history.
- Downstream, you apply changes to the target with MERGE, or keep the full change history.

#### CDC event anatomy
Each event has the operation (create, update, delete), the before and after row images, the source position (LSN or binlog offset) and a timestamp. Ordering per key matters.

#### Operational concerns
- Initial snapshot followed by streaming changes.
- Replication slots on PostgreSQL can fill the source disk if the consumer stops; monitor them.
- Schema changes on the source need handling.

#### Pitfalls
- Adopting an expensive managed tool for one small source.
- A stalled CDC consumer silently growing the source database's WAL.

You are ready to move on when you can run Debezium against a Postgres container, see insert, update and delete events, and explain how you would apply them to a warehouse table.

Key concepts: Connector-based ingestion, Airbyte and Fivetran, dlt for Python pipelines, Log-based CDC, Debezium, Before and after images, Replication slots and monitoring.

Mini project: With Docker Compose, run PostgreSQL and Airbyte (or dlt) to sync a table into DuckDB or BigQuery. Then add a hard delete in the source and check whether your sync captured it; document the setting needed.

Self-check: Why does log-based CDC capture deletes when a query on updated_at cannot?

Resources:
- [Debezium documentation](https://debezium.io/documentation/) (Debezium)
- [Airbyte documentation](https://docs.airbyte.com/) (Airbyte)
- [dlt documentation](https://dlthub.com/docs/intro) (dltHub)

### dbt Fundamentals

core · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/dbt-fundamentals

Build transformation pipelines as SQL models with dbt: sources, ref, materializations, project structure, documentation and the DAG.

dbt (data build tool) turns SQL SELECT statements into a managed, tested, documented transformation pipeline inside your warehouse. It is now a default skill for data and analytics engineers, and dbt Core is free and open source.

#### The core idea
Each **model** is a `.sql` file containing a SELECT. dbt wraps it in the right DDL and builds it as a view or table. Models reference each other with `{{ ref('stg_orders') }}`, which lets dbt build a **DAG** and run models in dependency order.

#### Key building blocks
- **Sources**: declare raw tables in YAML and reference them with `{{ source('razorpay', 'payments') }}`. You can check source **freshness**.
- **Materializations**: `view`, `table`, `incremental`, `ephemeral`. Choose per model.
- **Project structure**: `staging` (one model per source table, renames and casts), `intermediate`, `marts` (facts and dimensions).
- **YAML properties**: descriptions, column docs and tests live next to models.
- **Seeds**: small CSVs (like a mapping of state codes) version-controlled with the project.

#### Commands
`dbt run`, `dbt test`, `dbt build` (run and test in order), `dbt docs generate` and `dbt docs serve` for a browsable catalog with lineage graphs. Select subsets with `--select stg_orders+`.

#### Environments
Use separate **targets** (dev schema per developer, prod schema) in `profiles.yml`. CI runs dbt on pull requests before merging.

#### Pitfalls
- Hard-coding table names instead of using ref and source, breaking lineage and environments.
- Putting all logic in one 500-line model.

You are ready to move on when you can build a dbt project with sources, staging and mart models, generate docs with a lineage graph, and run it against DuckDB, Postgres or a warehouse.

Key concepts: Models and ref, Sources and freshness, Materializations, Staging, intermediate, marts, Seeds, dbt build and node selection, dbt docs and lineage, Profiles and targets.

Mini project: Create a dbt Core project using dbt-duckdb or BigQuery over a sample e-commerce dataset. Build staging models for each source, a fct_orders and dim_customers mart, add descriptions, and publish the generated docs site via GitHub Pages.

Self-check: What does ref() give you that writing the full table name does not?

Resources:
- [dbt documentation](https://docs.getdbt.com/docs/introduction) (dbt Labs)
- [How we structure our dbt projects](https://docs.getdbt.com/best-practices/how-we-structure/1-guide-overview) (dbt Labs)
- [Data Engineering Zoomcamp (analytics engineering module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Advanced dbt: Incremental Models, Snapshots and Macros

recommended · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/dbt-advanced

Scale dbt projects with incremental models, snapshots for SCD Type 2, Jinja macros, packages, model contracts and CI with slim builds.

Once a dbt project grows beyond a few models, full rebuilds get slow and repeated SQL creeps in. These features keep larger projects fast and maintainable.

#### Incremental models
- Materialize as `incremental` and filter new rows with `{% if is_incremental() %}`.
- Strategies: `append`, `merge` (with a `unique_key`), `delete+insert`, `insert_overwrite` for partitions. Support varies by warehouse.
- Include a lookback window for late data, and run a periodic `--full-refresh` if logic changes.

#### Snapshots
dbt **snapshots** implement SCD Type 2 for you, using a `timestamp` or `check` strategy, and add `dbt_valid_from` and `dbt_valid_to` columns. Use them to capture history of mutable source tables.

#### Jinja and macros
- dbt SQL is templated with Jinja: loops, conditionals and variables.
- **Macros** are reusable SQL functions (for example converting paise to rupees or generating a date spine).
- **Packages** such as dbt-utils and dbt-expectations add tested macros; install with `packages.yml` and `dbt deps`.

#### Governance features
- **Model contracts** enforce column names and types on important models.
- **Model versions** and **access** levels (public, protected, private) help larger teams.
- **Exposures** document dashboards and apps that depend on models.

#### CI and deployment
Run `dbt build --select state:modified+` (slim CI) against a temporary schema on each pull request, so only changed models and their children are built.

#### Pitfalls
- Incremental models with no unique key that duplicate rows on reruns.
- Macro-heavy projects nobody can read. Use Jinja to remove repetition, not to be clever.

You are ready to move on when your dbt project has an incremental fact table, a snapshot-based customer history, one custom macro, a package, and a GitHub Actions workflow running slim CI.

Key concepts: Incremental models and strategies, is_incremental and lookback windows, Snapshots, Jinja templating, Macros, Packages like dbt-utils, Model contracts and versions, Exposures, Slim CI with state selection.

Mini project: Extend your dbt project: convert fct_orders to an incremental merge model with a 3-day lookback, add a snapshot for customers, write a macro for currency conversion, and set up slim CI in GitHub Actions.

Self-check: An incremental model filters on updated_at > max(updated_at) in the target. What happens to a record that arrives two days late, and how do you fix it?

Resources:
- [dbt incremental models](https://docs.getdbt.com/docs/build/incremental-models) (dbt Labs)
- [dbt snapshots](https://docs.getdbt.com/docs/build/snapshots) (dbt Labs)
- [dbt Jinja and macros](https://docs.getdbt.com/docs/build/jinja-macros) (dbt Labs)
- [dbt best practices](https://docs.getdbt.com/best-practices) (dbt Labs)

## Containers and Orchestration

Package pipelines in containers and run them on a schedule with dependencies, retries, alerts and backfills. Learn the concepts once, then go deep on one orchestrator.

### Docker for Data Engineers

core · beginner · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/docker

Package pipelines and run local data stacks with Docker and Docker Compose: images, containers, volumes, networks and environment config.

Docker lets you run Postgres, Kafka, Airflow and your own pipeline code locally exactly as they run in production. Most tutorials, including the DE Zoomcamp, assume you can use it.

#### Core concepts
- **Image**: a packaged filesystem plus a start command, built from a `Dockerfile`.
- **Container**: a running instance of an image.
- **Registry**: where images are stored (Docker Hub, ECR, Artifact Registry).
- **Volumes**: persist data outside the container (so your Postgres data survives restarts).
- **Networks**: containers talk to each other by service name.

#### Dockerising a pipeline
- Start from a slim Python base image, copy the lock file first, install dependencies, then copy code. This order makes rebuilds fast thanks to **layer caching**.
- Pass configuration through **environment variables**; never bake secrets into images.
- One process per container; make the command parameterised (`python -m pipeline --date 2026-10-24`).

#### Docker Compose
A `docker-compose.yml` defines a whole local stack (Postgres, pgAdmin, your extractor, MinIO) started with `docker compose up`. Great for portfolio projects that reviewers can run in one command.

#### Beyond Docker
In production, containers run on Kubernetes, ECS, Cloud Run or as tasks launched by an orchestrator. You do not need deep Kubernetes knowledge as a junior, but know what a pod is.

#### Pitfalls
- Huge images from full base images and leftover build files.
- Storing data inside a container without a volume and losing it on restart.
- `localhost` confusion: inside a container, localhost is the container itself, not your laptop.

You are ready to move on when your API extractor runs as a Docker image and a Compose file starts it alongside Postgres and MinIO with a single command.

Key concepts: Images and containers, Writing a Dockerfile, Layer caching, Volumes and networks, Docker Compose, Environment variables and secrets, Container registries, Kubernetes basics.

Mini project: Write a Dockerfile for your API extractor and a docker-compose.yml that runs it with PostgreSQL and MinIO. Document in the README how anyone can clone the repo and run the whole stack with one command.

Self-check: Your containerised script cannot connect to Postgres at localhost:5432 even though Postgres is running in Compose. Why, and what is the fix?

Resources:
- [Docker get started](https://docs.docker.com/get-started/) (Docker)
- [Docker Compose documentation](https://docs.docker.com/compose/) (Docker)
- [Docker roadmap](https://roadmap.sh/docker) (roadmap.sh)
- [Data Engineering Zoomcamp (Docker module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Orchestration Concepts

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/orchestration-concepts

Understand DAGs, schedules, logical dates, dependencies, retries, sensors, backfills, SLAs and alerting, independent of any one tool.

Cron can run a script at 2 a.m. It cannot tell you that step 3 failed, wait for an upstream file, retry with backoff, or rerun last month. An **orchestrator** does all of that.

#### Core ideas
- **DAG (directed acyclic graph)**: tasks and their dependencies. Extract before transform before test before publish.
- **Schedule**: cron expressions or presets (daily, hourly). Know cron syntax.
- **Logical date or partition**: each run processes a specific time window (the data for 23 October), not "whatever is new now". This is what makes reruns and backfills correct.
- **Retries** with delay for transient failures; **timeouts** so stuck tasks fail.
- **Sensors and triggers**: wait for a file, a table partition or another DAG.
- **Backfills**: run the DAG for a range of past dates.
- **Concurrency limits** so you do not overload a source database.

#### Operating pipelines
- **Alerting** on failure to Slack, email or PagerDuty with a link to logs.
- **SLAs**: the finance dashboard must be fresh by 9 a.m. IST; alert if it will be late.
- **Observability**: run history, durations, which tasks are slow.

#### Task-centric vs asset-centric
Older tools think in **tasks** ("run this function"). Newer ones (Dagster, and Airflow's newer asset features) think in **data assets** ("this table should exist and be fresh"). Both describe the same pipelines from different angles.

#### Keep orchestrators thin
The orchestrator should **trigger** work (a dbt run, a Spark job, a container), not do heavy processing inside its own workers.

#### Pitfalls
- Tasks that depend on wall-clock time instead of the logical date.
- Giant tasks that do everything, so one failure means rerunning hours of work.

You are ready to move on when you can draw the DAG for a daily ingestion, dbt and quality-check pipeline, label retries, sensors and SLAs, and explain how you would backfill the last 30 days.

Key concepts: DAGs and dependencies, Cron schedules, Logical dates and partitions, Retries and timeouts, Sensors and event triggers, Backfills, Alerting and SLAs, Task-centric vs asset-centric.

Mini project: Design (on paper or in a diagram tool) the DAG for a daily pipeline: extract from an API and Postgres, load to a lake, run dbt, run quality checks, refresh a dashboard. Specify retries, timeouts, sensors, SLA and alert channel for each task.

Self-check: Why should a daily job process 'the logical date' rather than 'yesterday according to the server clock'?

Resources:
- [Apache Airflow documentation](https://airflow.apache.org/docs/) (Apache Airflow)
- [Dagster documentation](https://docs.dagster.io/) (Dagster)
- [Data Engineering Zoomcamp (orchestration module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Apache Airflow

recommended · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/airflow

Build, schedule and operate pipelines with Apache Airflow: DAG files, operators, the TaskFlow API, connections, XComs, scheduling and production best practices.

Apache Airflow is the most widely used orchestrator and appears in the majority of Indian data engineering job descriptions. Managed versions include AWS MWAA, Google Cloud Composer and Astronomer.

#### Architecture
- **Scheduler** decides what should run; **executors** (Local, Celery, Kubernetes) run tasks; the **webserver or API server** provides the UI; a **metadata database** stores state.
- DAGs are **Python files** in a DAGs folder, parsed regularly.

#### Writing DAGs
- Define a DAG with `schedule`, `start_date`, `catchup` and default `retries`.
- **Operators** do work: `BashOperator`, `PythonOperator`, provider operators for S3, BigQuery, Snowflake, Databricks, `KubernetesPodOperator`.
- The **TaskFlow API** (`@dag`, `@task` decorators) makes Python DAGs cleaner and passes small values between tasks via **XComs**.
- **Connections and variables** store credentials and config outside code (ideally backed by a secrets manager).
- **Templating** with `{{ ds }}` and other macros injects the logical date into commands and SQL.

#### Running and operating
- Run locally with the official Docker Compose setup or the Astro CLI.
- Trigger runs, clear failed tasks, and run **backfills** from the CLI or UI.
- Use **pools** to limit concurrency against fragile sources.
- **Datasets or assets** let one DAG trigger when another updates a table.

#### Best practices
- Keep top-level DAG code light; heavy imports and API calls at parse time slow the scheduler.
- Make every task idempotent and parameterised by the logical date.
- Do not pass large data through XComs; pass paths or table names.

#### Pitfalls
- `catchup=True` with an old `start_date` launching hundreds of runs on deploy.
- Doing heavy pandas processing inside Airflow workers instead of delegating.

You are ready to move on when you can run Airflow in Docker, write a TaskFlow DAG that extracts, loads and triggers dbt for a logical date, and backfill a week of runs.

Key concepts: Scheduler, executor, metadata DB, DAG definition and schedules, Operators and providers, TaskFlow API, XComs, Connections and variables, Jinja templating and ds, Backfills and catchup, Pools and concurrency, MWAA and Cloud Composer.

Mini project: Run Airflow with Docker Compose. Build a DAG that pulls data from a public API for the logical date, writes Parquet to MinIO, loads it into Postgres or DuckDB, runs dbt build, and posts a failure alert. Backfill 7 days and screenshot the grid view.

Self-check: You deploy a DAG with start_date one year ago and catchup enabled. What happens, and how do you prevent it?

Resources:
- [Apache Airflow documentation](https://airflow.apache.org/docs/apache-airflow/stable/index.html) (Apache Airflow)
- [Airflow best practices](https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html) (Apache Airflow)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Dagster

alternative · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/dagster

Orchestrate pipelines as software-defined assets with Dagster: assets, partitions, resources, sensors and built-in lineage and observability.

Dagster is a modern orchestrator built around **data assets** rather than tasks. Instead of "run this function at 2 a.m.", you declare "this table depends on these tables and should be refreshed daily". It is growing fast in newer startups and data platform teams.

#### Core concepts
- **Assets**: Python functions decorated with `@asset` that produce a table, file or model. Dependencies come from function arguments.
- **Partitions**: daily, monthly or custom partitions per asset, which makes backfills first-class.
- **Resources**: configurable connections (warehouse, S3, API clients) injected into assets, easy to swap for tests.
- **Jobs and schedules**: select assets to materialize on a schedule.
- **Sensors**: trigger on external events such as a new file.
- **Asset checks**: data quality checks attached to assets.

#### Integrations
Strong integrations with dbt (each dbt model becomes an asset), Spark, Snowflake, BigQuery, DuckDB, Airbyte and more. The UI shows an asset lineage graph with freshness and materialization history.

#### Why teams choose it
- Local development and unit testing are easy.
- Lineage and observability come built in.
- Partitioned backfills are simpler than in task-based tools.

#### Trade-offs
Smaller community and fewer job listings than Airflow in India, and the asset mindset takes adjustment if you learned Airflow first.

#### Pitfalls
- Wrapping a whole pipeline in one giant asset, losing the lineage benefits.
- Hard-coding connections instead of using resources.

You are ready to move on when you can build a Dagster project with partitioned assets for ingestion and dbt models, add an asset check, and backfill a date range from the UI.

Key concepts: Software-defined assets, Partitions and backfills, Resources, Schedules and sensors, Asset checks, dbt integration, Dagster UI and lineage.

Mini project: Build a Dagster project with daily-partitioned assets: raw API data, a cleaned Parquet asset and dbt models via the dbt integration. Add an asset check for row count and backfill the last 7 partitions.

Self-check: How does thinking in assets rather than tasks change the way you debug a stale dashboard?

Resources:
- [Dagster documentation](https://docs.dagster.io/) (Dagster)
- [Dagster University](https://courses.dagster.io/) (Dagster)

### Prefect

alternative · intermediate · about 6 h · https://www.internhack.in/roadmaps/tracks/data-engineer/prefect

Orchestrate Python workflows with Prefect: flows, tasks, retries, caching, deployments, work pools and the Prefect UI.

Prefect is a Python-native orchestrator that feels like writing normal Python. You decorate functions and get retries, logging, scheduling and a UI with very little boilerplate. It is popular with small teams and ML-heavy workflows.

#### Core concepts
- **Flows**: `@flow` decorated functions; the unit of orchestration.
- **Tasks**: `@task` decorated functions inside flows, with **retries**, **timeouts** and **caching** options.
- Flows can be dynamic: loops and conditionals in plain Python decide what runs.
- **Deployments** attach schedules and parameters to a flow so it runs on infrastructure.
- **Work pools and workers** decide where runs execute: a local process, Docker, Kubernetes or serverless cloud.
- **Blocks** store configuration and credentials (S3, databases, Slack).

#### Observability
The Prefect UI (self-hosted server or Prefect Cloud's free tier) shows flow runs, task states, logs and failures, and supports automations such as alerting on failure.

#### Why teams choose it
- Very low friction for Python developers.
- Dynamic workflows are natural.
- Easy to run locally and test.

#### Trade-offs
Fewer prebuilt integrations than Airflow and less presence in Indian job descriptions. Backfills and partitioned data need more explicit design than in Dagster.

#### Pitfalls
- Treating Prefect as a magic retry wrapper while tasks are still not idempotent.
- Passing huge DataFrames between tasks instead of writing to storage.

You are ready to move on when you can deploy a scheduled Prefect flow that extracts, loads and runs dbt with retries, view its runs in the UI, and rerun it for a past date via parameters.

Key concepts: Flows and tasks, Retries, timeouts, caching, Deployments and schedules, Work pools and workers, Blocks for config and secrets, Automations and alerts.

Mini project: Write a Prefect flow that extracts from a public API, writes Parquet, loads into DuckDB and runs dbt build. Add retries, a date parameter and a daily deployment, then rerun it for three past dates.

Self-check: How would you implement a backfill in Prefect for the last 30 days, and what must be true about your tasks for it to be safe?

Resources:
- [Prefect documentation](https://docs.prefect.io/) (Prefect)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

## Streaming Data

Process data as it happens. Learn event streaming concepts, Apache Kafka in depth, and stream processing with Spark Structured Streaming or Apache Flink.

### Stream Processing Concepts

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/streaming-concepts

Understand events, event time vs processing time, windows, watermarks, state, delivery guarantees and when streaming is worth its cost.

Streaming systems process unbounded data: events keep arriving forever. The concepts are different from batch and are a common source of interview questions.

#### Events and time
- An **event** is an immutable fact: "payment 123 succeeded at 10:02:05".
- **Event time**: when it happened. **Processing time**: when your system saw it. They differ because of network delays and offline devices (a delivery partner's phone losing signal in a basement).
- Correct results use event time.

#### Windows
- **Tumbling**: fixed, non-overlapping (orders per minute).
- **Sliding or hopping**: overlapping (orders in the last 5 minutes, updated every minute).
- **Session**: grouped by gaps in activity.

#### Watermarks and late data
A **watermark** says "I believe I have seen all events up to time T". It lets the engine close windows and drop or side-output data that arrives too late. Trade-off: waiting longer is more complete but slower.

#### State and guarantees
- Aggregations and joins keep **state**; it must be checkpointed to survive failures.
- Delivery semantics: **at-most-once**, **at-least-once**, **exactly-once**. Exactly-once end to end needs cooperation between the source, the engine and an idempotent or transactional sink.

#### When to stream
Fraud detection on UPI payments, live order tracking, real-time inventory and alerting justify streaming. Most reporting does not. Streaming costs more to build and operate. Micro-batch (every few minutes) is often a pragmatic middle ground.

#### Pitfalls
- Using processing time and getting wrong numbers whenever events are delayed.
- Assuming exactly-once because the engine advertises it while writing to a non-idempotent sink.

You are ready to move on when you can explain, with a food delivery example, how a 5-minute tumbling window with a 2-minute watermark handles an event that arrives 3 minutes late.

Key concepts: Events and immutability, Event time vs processing time, Tumbling, sliding, session windows, Watermarks and late data, Stateful processing and checkpoints, Delivery semantics, Micro-batch vs continuous, Lambda vs Kappa architecture.

Mini project: Write a small Python simulation that generates delivery events with random delays, then compute 1-minute tumbling counts by processing time and by event time with a watermark. Plot or tabulate how the two results differ.

Self-check: Why can a pipeline that is 'exactly-once' inside the engine still produce duplicates in the target database?

Resources:
- [Spark Structured Streaming programming guide](https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html) (Apache Spark)
- [Apache Flink documentation](https://nightlies.apache.org/flink/flink-docs-stable/) (Apache Flink)
- [Confluent Developer courses](https://developer.confluent.io/) (Confluent)

### Apache Kafka Fundamentals

core · intermediate · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/kafka

Use Kafka as a durable event log: topics, partitions, offsets, producers, consumers and consumer groups, replication and retention.

Apache Kafka is the backbone of real-time data at companies like Flipkart, Swiggy, Paytm and most large banks. It is a distributed, durable, append-only **log** that many producers write to and many consumers read from independently.

#### Core concepts
- **Topic**: a named stream of records (`orders`, `payments`).
- **Partition**: a topic is split into ordered partitions for parallelism. Ordering is guaranteed only **within** a partition.
- **Key**: records with the same key (such as `order_id`) go to the same partition, keeping their order.
- **Offset**: each record's position in a partition. Consumers track offsets to know where they are.
- **Broker**: a Kafka server; a **cluster** has several. Newer Kafka uses **KRaft** instead of ZooKeeper.
- **Replication factor**: copies of each partition across brokers for durability.
- **Retention**: records are kept for a time or size limit, not deleted when read. **Log compaction** keeps the latest value per key.

#### Producers and consumers
- Producers choose keys, batching, compression and **acks** (`acks=all` for durability). **Idempotent producers** avoid duplicates on retry.
- **Consumer groups** share partitions among members for scaling; each partition goes to one consumer in a group. Adding consumers beyond the partition count does nothing.
- **Committing offsets** after processing gives at-least-once; committing before gives at-most-once.

#### Running it
Run Kafka locally with Docker, or try managed services (Confluent Cloud free tier, Amazon MSK, Redpanda as a Kafka-compatible alternative). Use the CLI tools to create topics, produce and consume.

#### Pitfalls
- Too few partitions limiting throughput forever (increasing later breaks key ordering).
- Hot partitions from a skewed key.
- Consumer lag growing unnoticed; always monitor lag.

You are ready to move on when you can run Kafka in Docker, produce keyed order events from Python, consume them with a two-member consumer group, and explain which consumer received which partitions and why.

Key concepts: Topics and partitions, Keys and ordering, Offsets and commits, Consumer groups, Brokers, replication, KRaft, Retention and log compaction, Producer acks and idempotence, Consumer lag monitoring, Managed Kafka and Redpanda.

Mini project: Run Kafka in Docker Compose. Write a Python producer that emits simulated UPI payment events keyed by user_id, and a consumer group of two consumers that aggregates totals per user. Kill one consumer and observe the rebalance and lag.

Self-check: A topic has 6 partitions and your consumer group has 10 consumers. How many are idle, and how would you increase throughput?

Resources:
- [Apache Kafka documentation](https://kafka.apache.org/documentation/) (Apache Kafka)
- [Apache Kafka quickstart](https://kafka.apache.org/quickstart) (Apache Kafka)
- [Confluent Developer courses](https://developer.confluent.io/) (Confluent)
- [Data Engineering Zoomcamp (streaming module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

### Kafka Connect and Schema Registry

recommended · advanced · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/kafka-ecosystem

Move data into and out of Kafka without custom code using Kafka Connect, and keep producers and consumers compatible with a schema registry.

Writing a custom producer for every database and a custom consumer for every sink is wasteful. The Kafka ecosystem provides standard pieces for both.

#### Kafka Connect
- A framework for **source connectors** (database, files, Debezium CDC into Kafka) and **sink connectors** (Kafka into S3, BigQuery, Snowflake, Elasticsearch, Postgres).
- Runs as a cluster of workers configured through JSON and a REST API.
- **Single message transforms (SMTs)** do light changes like renaming fields or routing topics.
- Handles offsets, retries and scaling for you.

#### Schema Registry
- Stores **Avro, Protobuf or JSON Schema** definitions per topic.
- Producers register schemas; messages carry only a small schema ID.
- **Compatibility modes** (backward, forward, full) reject breaking changes at produce time, stopping a bad deploy from breaking every consumer. This connects directly to what you learned about schema evolution.

#### A typical CDC to lake pipeline
Postgres, then Debezium source connector, then Kafka topics (one per table), then an S3 sink connector writing Parquet, then a lakehouse table updated by a merge job. Or a streaming engine consuming the topics directly.

#### Kafka Streams and ksqlDB
For lightweight processing inside the Kafka ecosystem, Kafka Streams (a Java library) and ksqlDB (SQL over streams) exist. Know what they are; Spark or Flink are more common in data engineering roles.

#### Pitfalls
- No schema registry, so one producer changing a field type breaks consumers silently.
- Ignoring dead letter queues and losing bad records.

You are ready to move on when you can run a Debezium source and a file or S3 sink connector through Kafka Connect with Avro and Schema Registry, and show a compatible schema change succeeding while an incompatible one is rejected.

Key concepts: Source and sink connectors, Connect workers and REST API, Single message transforms, Schema Registry, Compatibility modes, Dead letter queues, Kafka Streams and ksqlDB.

Mini project: With Docker Compose, run Postgres, Kafka, Kafka Connect with Debezium, and Schema Registry. Stream changes from an orders table into Kafka as Avro, sink them to files or MinIO, then attempt a breaking schema change and capture the rejection.

Self-check: Why does a schema registry reduce message size and also prevent outages?

Resources:
- [Apache Kafka documentation (Connect)](https://kafka.apache.org/documentation/) (Apache Kafka)
- [Confluent documentation](https://docs.confluent.io/) (Confluent)
- [Debezium documentation](https://debezium.io/documentation/) (Debezium)

### Spark Structured Streaming

recommended · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/spark-structured-streaming

Build streaming pipelines with the same DataFrame API you use for batch: Kafka sources, event-time windows, watermarks, checkpoints and output modes.

Spark Structured Streaming treats a stream as an unbounded table that keeps growing. You write almost the same DataFrame code as batch, and Spark runs it incrementally, usually in micro-batches. If you already know PySpark, this is the fastest way into streaming.

#### Building a stream
- Read: `spark.readStream.format("kafka")` with bootstrap servers and topics; parse the value bytes from JSON or Avro.
- Transform with normal DataFrame operations.
- Write: `writeStream` to Delta, Parquet, Kafka or a `foreachBatch` function for custom sinks such as MERGE into a table.

#### Time and state
- `groupBy(window("event_time", "5 minutes"))` for tumbling or sliding windows.
- `withWatermark("event_time", "10 minutes")` bounds state and handles late data.
- Stream-stream joins and deduplication (`dropDuplicatesWithinWatermark`) also rely on watermarks.

#### Reliability
- A **checkpoint location** stores offsets and state; never share it between queries or delete it casually.
- **Output modes**: append, update, complete. Not all are valid for every query.
- **Triggers**: default micro-batch, fixed interval, or `availableNow` to process all available data then stop (handy for cheap scheduled "streaming").
- Exactly-once with replayable sources (Kafka) and idempotent or transactional sinks (Delta).

#### Monitoring
Watch input rate vs processing rate, batch duration and state size in the Spark UI's Structured Streaming tab.

#### Pitfalls
- No watermark on an aggregation, so state grows until the job runs out of memory.
- Changing the query in incompatible ways and reusing the old checkpoint.
- Writing tiny files every few seconds to a lake without compaction.

You are ready to move on when you can stream Kafka order events into a Delta table with 5-minute event-time windows and a watermark, restart the job and show it resumes without duplicates.

Key concepts: readStream and writeStream, Kafka source, Event-time windows, Watermarks, Checkpoints, Output modes, Triggers and availableNow, foreachBatch and MERGE, Stream-stream joins.

Mini project: Build a pipeline that reads simulated delivery events from Kafka, computes per-city orders per 5-minute window with a watermark, and writes to a Delta table. Kill and restart the job and verify counts are not duplicated.

Self-check: What happens to the state of a windowed aggregation if you do not set a watermark?

Resources:
- [Structured Streaming programming guide](https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html) (Apache Spark)
- [Structured Streaming and Kafka integration](https://spark.apache.org/docs/latest/structured-streaming-kafka-integration.html) (Apache Spark)
- [Delta Lake documentation](https://docs.delta.io/) (Delta Lake)

### Apache Flink Basics

alternative · advanced · about 8 h · https://www.internhack.in/roadmaps/tracks/data-engineer/flink

Learn Apache Flink, the true event-at-a-time stream processor: DataStream and Table APIs, Flink SQL, state, checkpoints and event-time processing.

Apache Flink processes events one at a time with very low latency and powerful state management. It is used for fraud detection, real-time features and alerting at large tech and fintech companies, and managed versions exist on AWS (Managed Service for Apache Flink) and Confluent.

#### Core concepts
- **Job graph** of operators (sources, transformations, sinks) running in parallel on **TaskManagers**, coordinated by a **JobManager**.
- **DataStream API** (Java, Python via PyFlink) for fine-grained control.
- **Table API and Flink SQL** for declarative pipelines: `SELECT window_start, city, COUNT(*) FROM TABLE(TUMBLE(...)) GROUP BY ...`. Flink SQL is the easiest entry point.

#### State and time
- **Keyed state** per key (per user, per card) with large state stored in RocksDB.
- **Event time and watermarks** are first-class.
- **Timers** let you act when time passes (flag a cart abandoned after 30 minutes).

#### Fault tolerance
- **Checkpoints** periodically snapshot state and source offsets for exactly-once processing.
- **Savepoints** are manual snapshots used for upgrades and migrations.

#### Flink vs Spark Structured Streaming
- Flink: lower latency, richer state and timers, better for complex event processing.
- Spark: one engine for batch and streaming, easier if your team already runs Spark.
Learn one in depth; understand where the other fits.

#### Pitfalls
- Unbounded state from keys that never expire; set **state TTL**.
- Upgrading a job without a savepoint and losing state.

You are ready to move on when you can run Flink locally with Docker, write a Flink SQL job that reads from Kafka and computes windowed counts, and explain how checkpoints give exactly-once results.

Key concepts: JobManager and TaskManagers, DataStream API, Flink SQL and Table API, Keyed state and RocksDB, Event time and timers, Checkpoints and savepoints, State TTL, PyFlink.

Mini project: Run Flink and Kafka in Docker. Using Flink SQL, read card transaction events from Kafka and flag any card with more than 5 transactions in 1 minute, writing alerts to another Kafka topic.

Self-check: What is the difference between a checkpoint and a savepoint, and when do you use each?

Resources:
- [Apache Flink documentation](https://nightlies.apache.org/flink/flink-docs-stable/) (Apache Flink)
- [Apache Flink](https://flink.apache.org/) (Apache Flink)
- [Confluent Developer courses](https://developer.confluent.io/) (Confluent)

## Data Quality and Testing

Bad data that looks fine is worse than a failed job. Learn to define, test, monitor and contract data quality so problems are caught before stakeholders see them.

### Data Quality Fundamentals

core · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/data-quality-fundamentals

Define data quality in measurable dimensions, decide where checks belong in a pipeline, and choose between blocking and warning on failures.

Data quality is not a vague feeling; it is a set of properties you can measure and test. Trust in a data team is built or lost on this.

#### Quality dimensions
- **Completeness**: required fields present, expected rows arrived (no missing day of orders).
- **Uniqueness**: no duplicate keys.
- **Validity**: values in allowed ranges and formats (PIN codes are 6 digits, amounts are not negative, status is in a known list).
- **Consistency**: the same fact agrees across tables (order totals equal the sum of items).
- **Accuracy**: matches reality or the source system (reconciled totals).
- **Timeliness or freshness**: data arrived when expected.

#### Where to check
- **At ingestion**: schema, row counts, nulls in keys. Catch broken sources early.
- **After transformations**: uniqueness of grain, referential integrity, business rules.
- **Before publishing**: reconciliation against source totals and sanity bounds (today's revenue within a range of last week's).

#### Severity and actions
- **Error (blocking)**: stop the pipeline so bad data does not reach dashboards.
- **Warn**: log and alert but continue.
- Quarantine bad records in a separate table rather than silently dropping them.

#### Process
Every incident should end with a new test that would have caught it. Track data incidents like software bugs.

#### Pitfalls
- Hundreds of noisy tests that everyone learns to ignore.
- Only testing schema while business logic silently breaks (revenue doubled because a join fanned out).
- Dropping bad rows without telling anyone.

You are ready to move on when you can take one of your pipelines and list, for each layer, the specific checks you would add, their severity and what happens when each fails.

Key concepts: Completeness and uniqueness, Validity and consistency, Accuracy and reconciliation, Freshness, Blocking vs warning checks, Quarantine tables, Data incident process.

Mini project: Write a data quality plan for your dbt or Spark project: a table of checks per layer with dimension, rule, severity and owner. Implement five of them as SQL queries that return failing rows.

Self-check: Revenue on the dashboard doubled overnight but every schema and null check passed. Which quality dimension failed and what test would catch it?

Resources:
- [dbt data tests](https://docs.getdbt.com/docs/build/data-tests) (dbt Labs)
- [Great Expectations documentation](https://docs.greatexpectations.io/) (Great Expectations)
- [Data quality](https://en.wikipedia.org/wiki/Data_quality) (Wikipedia)

### Testing with dbt

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/dbt-tests

Use dbt's generic and singular data tests, packages like dbt-expectations, source freshness and unit tests to guard every model.

If you use dbt, its testing features are the cheapest way to get broad coverage. Tests live next to models in YAML and run with `dbt build`.

#### Generic data tests
Declared on columns in YAML:
- `unique` and `not_null` on every primary key. This single habit prevents most fan-out bugs.
- `accepted_values` for status columns.
- `relationships` for foreign keys (every order's customer exists in dim_customers).
Configure `severity: warn` or `error`, and thresholds like `error_if: ">100"`.

#### Singular and custom tests
- **Singular tests**: a SQL file returning rows that violate a rule (orders where total does not equal sum of items). Zero rows means pass.
- **Custom generic tests**: write a parameterised test macro once, reuse it everywhere.
- Packages: **dbt-utils** (`unique_combination_of_columns`, `expression_is_true`) and **dbt-expectations** (Great Expectations style checks in dbt).

#### Source freshness
Configure `loaded_at_field` and warn or error thresholds on sources; `dbt source freshness` alerts you when an upstream load is late.

#### Unit tests
dbt unit tests define mock input rows and expected output for a model, testing transformation logic without real data. Use them for tricky logic like SCD handling or currency conversion.

#### Running in CI
Run `dbt build` on every pull request so tests block bad changes, and in production so bad data stops before marts update. Store test failures with `--store-failures` for debugging.

#### Pitfalls
- Tests only on marts, so issues propagate through staging unnoticed.
- Setting everything to warn so nothing ever fails.

You are ready to move on when every model in your dbt project has primary key tests, key relationships are tested, sources have freshness checks, and one complex model has a unit test.

Key concepts: unique and not_null, accepted_values and relationships, Severity and thresholds, Singular tests, Custom generic tests, dbt-utils and dbt-expectations, Source freshness, dbt unit tests.

Mini project: Add full test coverage to your dbt project: primary key tests on all models, relationship tests, accepted values, two singular business-rule tests, source freshness and one unit test. Break the data deliberately and show the failing test output.

Self-check: Which two tests on a model's primary key catch most join fan-out bugs, and why?

Resources:
- [dbt data tests](https://docs.getdbt.com/docs/build/data-tests) (dbt Labs)
- [dbt unit tests](https://docs.getdbt.com/docs/build/unit-tests) (dbt Labs)
- [dbt source freshness](https://docs.getdbt.com/docs/build/sources) (dbt Labs)

### Great Expectations and Pipeline Validation

recommended · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/great-expectations

Validate data in Python and Spark pipelines with Great Expectations (or similar tools like Soda and pandera): expectations, suites, checkpoints and data docs.

Not all data passes through dbt. Raw files, Spark jobs and Python ingestion also need validation, and **Great Expectations (GX)** is the most known open source tool for it.

#### Core concepts
- **Expectations**: declarative assertions such as `expect_column_values_to_not_be_null`, `expect_column_values_to_be_between`, `expect_table_row_count_to_be_between`, `expect_column_values_to_match_regex`.
- **Expectation suites**: a set of expectations for a dataset.
- **Data sources and batches**: connect GX to pandas, Spark or SQL and select the data to validate.
- **Checkpoints or validation definitions**: run a suite against a batch and trigger actions (alerts, stopping the pipeline).
- **Data Docs**: generated HTML reports of results.

#### Where it fits
- Validate raw files right after ingestion, before loading into silver.
- Validate Spark DataFrames before writing.
- Call validation as a task in your orchestrator and fail the DAG on errors.

#### Alternatives
- **Soda Core**: checks written in a YAML-based language (SodaCL).
- **pandera**: schema and value validation for pandas and Polars DataFrames in code.
- **dbt tests** for warehouse models.
Pick based on where your data lives; concepts are the same.

#### Pitfalls
- Auto-generating hundreds of expectations from a profile and never reviewing them.
- Running validation but not acting on failures.
- API changes between major GX versions; check the docs for your version.

You are ready to move on when you can add a validation step to your Airflow or Prefect pipeline that checks a raw file with a suite of at least six expectations and stops the run when they fail.

Key concepts: Expectations, Expectation suites, Data sources and batches, Checkpoints and actions, Data Docs, Soda Core, pandera.

Mini project: Add a Great Expectations (or pandera) validation task to your orchestrated pipeline that checks the raw extract for row count, null keys, value ranges and a regex on IDs. Make the DAG fail on errors and publish Data Docs.

Self-check: Why would you validate raw files with a tool like Great Expectations even if you already have dbt tests on the warehouse models?

Resources:
- [Great Expectations documentation](https://docs.greatexpectations.io/) (Great Expectations)
- [pandera documentation](https://pandera.readthedocs.io/) (pandera)
- [Soda documentation](https://docs.soda.io/) (Soda)

### Data Observability and Data Contracts

optional · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/observability-contracts

Monitor freshness, volume, schema and distribution automatically, and agree data contracts with producers so upstream changes stop breaking pipelines.

Tests check what you thought of. **Observability** watches for what you did not, and **contracts** stop many problems at the source.

#### Data observability
Monitor every important table for:
- **Freshness**: when was it last updated?
- **Volume**: did today's row count drop by 40 percent?
- **Schema**: did columns appear, disappear or change type?
- **Distribution**: did the share of null cities or the average order value shift sharply?
- **Lineage**: what is affected downstream when something breaks?
Tools range from commercial platforms (Monte Carlo and others) to open source options (Elementary for dbt, custom SQL monitors plus alerts). Start simple: a daily job computing row counts and freshness with thresholds.

#### Data contracts
A data contract is an agreement between a data producer (often a backend team) and consumers:
- Schema with types, required fields and meaning.
- Quality expectations and SLAs (delivered by 6 a.m., no null order_id).
- Ownership and a change process (breaking changes need notice and versioning).
Enforce contracts with schema registries for events, dbt model contracts for tables and CI checks in producer repositories.

#### Pipeline SLAs and on-call
Define SLAs for critical datasets, alert the owning team, write runbooks, and run blameless post-mortems after incidents.

#### Pitfalls
- Alerting on everything so the team mutes the channel.
- Contracts written in a document nobody enforces.

You are ready to move on when you have a daily monitor that alerts on freshness and volume anomalies for your key tables, and a written contract for one source with an enforcement mechanism.

Key concepts: Freshness and volume monitoring, Schema change detection, Distribution anomalies, Data contracts, dbt model contracts, Elementary for dbt, SLAs, runbooks, post-mortems.

Mini project: Build a small observability job that records daily row counts and max timestamps for five tables, flags anomalies beyond a threshold, and posts to a Slack or Discord webhook. Write a one-page data contract for your orders source.

Self-check: A backend team renames a column and your pipeline loads nulls for three days. Which practice would have prevented this, and which would have detected it sooner?

Resources:
- [dbt model contracts](https://docs.getdbt.com/docs/collaborate/govern/model-contracts) (dbt Labs)
- [Elementary documentation](https://docs.elementary-data.com/) (Elementary)
- [Confluent documentation (Schema Registry)](https://docs.confluent.io/) (Confluent)

## The Cloud Data Stack

Most data platforms run in the cloud. Learn the cloud fundamentals every data engineer needs, then go deep on the data services of AWS or Google Cloud, and manage infrastructure as code.

### Cloud Fundamentals for Data Engineers

core · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/cloud-fundamentals

Understand regions, IAM, networking basics, managed vs serverless services, secrets and billing so you can work safely in any cloud account.

You do not need to be a cloud architect, but you must work safely and cost-consciously in AWS, GCP or Azure. Most production incidents and surprise bills come from basics.

#### Core concepts
- **Regions and zones**: choose regions near users and data, and check data residency needs (Mumbai and Hyderabad regions exist on major clouds, relevant for Indian regulations).
- **IAM**: users, groups, roles and policies. Use **roles** for services, follow least privilege, never share root credentials.
- **Networking basics**: VPCs, subnets, private vs public endpoints, security groups or firewall rules. Databases should not be publicly reachable.
- **Compute options**: VMs, containers (ECS, Cloud Run, GKE, EKS), serverless functions (Lambda, Cloud Functions), managed data services.
- **Managed vs self-managed**: managed services cost more per hour but save huge operations effort.

#### Secrets and security
Store credentials in Secrets Manager, Secret Manager or Key Vault. Enable encryption at rest (default on most services) and in transit. Turn on audit logs.

#### Billing hygiene
- Set **budgets and alerts** on day one of any personal account.
- Tag resources by project and owner.
- Delete or stop resources after practice; idle clusters and NAT gateways are classic bill shocks.
- Use free tiers and student credits (AWS Educate, Google Cloud Skills Boost, Azure for Students).

#### Pitfalls
- Access keys committed to GitHub; bots scan for them within minutes.
- Practising with admin permissions and never learning IAM.
- Forgetting a running cluster after a tutorial.

You are ready to move on when you have a personal cloud account with a budget alert, a non-root user with MFA, a service role with least-privilege access to one bucket, and no long-lived keys in code.

Key concepts: Regions, zones and data residency, IAM users, roles, policies, VPCs and private networking, Compute options, Managed vs serverless services, Secrets management, Budgets, alerts and tagging.

Mini project: Set up a personal AWS or GCP account properly: MFA, a budget alert at a small amount, a non-admin user, a bucket with public access blocked, and a service role that can only write to that bucket. Document each step with screenshots.

Self-check: Why should a pipeline running on a cloud VM use an attached role instead of access keys in an environment file?

Resources:
- [AWS Skill Builder](https://skillbuilder.aws/) (AWS)
- [Google Cloud Skills Boost](https://www.cloudskillsboost.google/) (Google Cloud)
- [AWS IAM documentation](https://docs.aws.amazon.com/iam/) (AWS)

### The AWS Data Stack

recommended · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/aws-data-stack

Build data platforms on AWS with S3, Glue, Athena, EMR, Redshift, Kinesis, MSK, Lambda, Step Functions and Lake Formation.

AWS has the largest market share and is the most requested cloud in Indian data engineering job descriptions. Learn the core data services and how they fit together.

#### Storage and catalog
- **S3**: the data lake.
- **Glue Data Catalog**: a Hive-compatible metastore of tables over S3, used by Athena, EMR, Redshift Spectrum and Glue jobs.
- **Lake Formation**: fine-grained permissions on lake tables.

#### Processing
- **AWS Glue**: serverless Spark (and Python shell) jobs, crawlers that infer schemas, and Glue Studio.
- **Amazon EMR**: managed Spark, Hive, Trino and Flink clusters, also available serverless.
- **Athena**: serverless SQL (Trino-based) over S3, pay per TB scanned; supports Iceberg tables.
- **Lambda**: small event-driven functions, such as triggering on a new S3 file.

#### Warehousing and streaming
- **Redshift**: the warehouse (covered earlier).
- **Kinesis Data Streams and Firehose**: managed streaming and delivery to S3 or Redshift.
- **Amazon MSK**: managed Kafka.

#### Orchestration
**MWAA** (managed Airflow) and **Step Functions** (state machines for serverless workflows).

#### A reference architecture
Source databases via DMS or Debezium, raw files to S3, Glue or EMR Spark to Iceberg tables, catalogued in Glue, queried by Athena or loaded into Redshift, orchestrated by MWAA, with Lake Formation for access control.

#### Pitfalls
- Glue crawlers inferring wrong schemas on messy data; define schemas explicitly for important tables.
- EMR clusters left running.
- Athena queries over unpartitioned CSV costing far more than over partitioned Parquet.

You are ready to move on when you can land files in S3, catalog them with Glue, transform them with a Glue or EMR Serverless Spark job into partitioned Parquet or Iceberg, and query them with Athena.

Key concepts: S3 as the data lake, Glue Data Catalog and crawlers, Glue ETL jobs, Athena, EMR and EMR Serverless, Kinesis and MSK, Lambda and Step Functions, MWAA, Lake Formation.

Mini project: Build a small AWS pipeline within free tier limits: upload CSVs to S3, trigger a Lambda that converts them to Parquet, catalog the output with Glue, and query it with Athena. Record cost per query and tear everything down afterwards.

Self-check: Why does converting CSV to partitioned Parquet reduce Athena costs, and roughly by how much?

Resources:
- [AWS Glue documentation](https://docs.aws.amazon.com/glue/) (AWS)
- [Amazon Athena documentation](https://docs.aws.amazon.com/athena/) (AWS)
- [Amazon EMR documentation](https://docs.aws.amazon.com/emr/) (AWS)
- [AWS Skill Builder](https://skillbuilder.aws/) (AWS)

### The Google Cloud Data Stack

alternative · intermediate · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/gcp-data-stack

Build data platforms on Google Cloud with Cloud Storage, BigQuery, Dataflow, Dataproc, Pub/Sub, Cloud Composer and Dataplex.

Google Cloud is strong in analytics, thanks largely to BigQuery, and is used by many Indian startups and digital-native companies. The BigQuery sandbox and free tier make it student-friendly.

#### Storage and warehouse
- **Cloud Storage (GCS)**: the data lake.
- **BigQuery**: the serverless warehouse at the centre of most GCP data platforms, with external and BigLake tables over GCS (including Iceberg).

#### Processing
- **Dataflow**: managed Apache Beam for batch and streaming pipelines with autoscaling.
- **Dataproc**: managed Spark and Hadoop clusters, plus Dataproc Serverless for Spark batches.
- **Cloud Run and Cloud Functions**: containers and functions for light ingestion jobs.
- **Dataform**: SQL transformation inside BigQuery, similar in spirit to dbt (dbt also works well with BigQuery).

#### Streaming
- **Pub/Sub**: managed messaging for events, often feeding Dataflow or BigQuery subscriptions directly.

#### Orchestration and governance
- **Cloud Composer**: managed Airflow.
- **Workflows**: lightweight service orchestration.
- **Dataplex** and the catalog features for discovery, lineage and governance across lakes and warehouses.

#### A reference architecture
App events via Pub/Sub to Dataflow to BigQuery; database extracts to GCS, loaded into BigQuery; dbt or Dataform for modeling; Composer for scheduling; Looker or Looker Studio for dashboards.

#### Pitfalls
- Unbounded BigQuery query costs on on-demand pricing; set quotas.
- Dataproc clusters left running; prefer Serverless or auto-delete settings.

You are ready to move on when you can build a pipeline that lands files in GCS, loads them into a partitioned BigQuery table, transforms them with dbt or Dataform, and schedules it with Composer or a lighter alternative.

Key concepts: Cloud Storage, BigQuery and BigLake, Dataflow and Apache Beam, Dataproc and Dataproc Serverless, Pub/Sub, Cloud Composer, Dataform, Dataplex.

Mini project: On GCP free tier, build a pipeline that uploads daily files to GCS, loads them into a partitioned BigQuery table with a Cloud Run job, and models them with dbt. Track bytes scanned per day and set a budget alert.

Self-check: When would you choose Dataflow over Dataproc for a pipeline, and what does each charge you for?

Resources:
- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [Dataflow documentation](https://cloud.google.com/dataflow/docs) (Google Cloud)
- [Pub/Sub documentation](https://cloud.google.com/pubsub/docs) (Google Cloud)
- [Google Cloud Skills Boost](https://www.cloudskillsboost.google/) (Google Cloud)

### Infrastructure as Code with Terraform

optional · intermediate · about 5 h · https://www.internhack.in/roadmaps/tracks/data-engineer/infrastructure-as-code

Define buckets, datasets, warehouses, roles and clusters as code with Terraform so data infrastructure is reviewable, reproducible and easy to tear down.

Clicking through a cloud console is fine for learning, but production infrastructure should be defined in code, reviewed in pull requests and recreated reliably. Terraform is the most common tool for this, and the DE Zoomcamp teaches it early.

#### Core concepts
- **Providers**: plugins for AWS, Google Cloud, Snowflake, Databricks and more.
- **Resources**: the things you create (an S3 bucket, a BigQuery dataset, an IAM role).
- **Variables and outputs**: parameterise environments (dev, prod) and expose values.
- **State**: Terraform's record of what exists. Store it remotely (S3 or GCS backend) with locking for teams; never commit it to Git, as it can contain secrets.
- **Modules**: reusable bundles (a "data lake bucket with lifecycle rules and encryption" module).

#### The workflow
`terraform init`, `terraform plan` (review changes), `terraform apply`, and `terraform destroy` to clean up after practice. In teams, CI runs `plan` on pull requests and `apply` after merge.

#### What data teams manage with it
Buckets and lifecycle rules, warehouse databases and roles (Snowflake and BigQuery providers), service accounts and IAM, Kafka topics, Composer or MWAA environments, and Databricks workspaces and jobs.

#### Alternatives
Pulumi (infrastructure in Python or TypeScript), AWS CloudFormation and CDK, and OpenTofu (an open source Terraform fork).

#### Pitfalls
- Manual console changes that drift from the code.
- Applying without reading the plan and destroying a production dataset.
- Local state files lost or committed with secrets.

You are ready to move on when you can create your project's bucket, dataset or warehouse, and service account with Terraform, review a plan, apply it, and destroy it cleanly.

Key concepts: Providers and resources, Variables and outputs, Remote state and locking, plan, apply, destroy, Modules, Terraform in CI, Pulumi and CDK.

Mini project: Write Terraform for your portfolio project's cloud resources (bucket with lifecycle rule, BigQuery dataset or Redshift Serverless namespace, a least-privilege service account). Use remote state, run plan in GitHub Actions, and destroy everything after testing.

Self-check: Why should Terraform state never be committed to a Git repository, and where should it live instead?

Resources:
- [Terraform documentation](https://developer.hashicorp.com/terraform/docs) (HashiCorp)
- [Terraform tutorials](https://developer.hashicorp.com/terraform/tutorials) (HashiCorp)
- [Data Engineering Zoomcamp (Terraform module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

## Governance, Security and Cost

Make data discoverable, traceable, secure and affordable: catalogs, lineage, access control, privacy law including India's DPDP Act, and cost and performance engineering.

### Data Catalogs and Governance

recommended · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/catalogs-governance

Help people find and trust data with catalogs, metadata, ownership, documentation and governance processes that do not slow everyone down.

As a platform grows to thousands of tables, the hard question becomes "which table should I use, and can I trust it?". Governance answers that with metadata, ownership and clear rules.

#### Data catalogs
A catalog indexes datasets with descriptions, owners, schemas, freshness, usage, tags and lineage, and makes them searchable.
- Open source: **DataHub**, **OpenMetadata**, **Amundsen**.
- Built into platforms: **Unity Catalog** (Databricks), **AWS Glue Data Catalog** and Lake Formation, **Dataplex** on GCP, **Snowflake Horizon**.
- dbt docs give a lightweight catalog for dbt models.

Note the two meanings: a **technical catalog** (a metastore engines use to find tables, like Glue or an Iceberg REST catalog) versus a **discovery catalog** for humans. Many products now do both.

#### Governance basics
- **Ownership**: every important dataset has a named owner team.
- **Certification**: mark gold tables as trusted; deprecate old ones visibly.
- **Classification**: tag columns containing PII or financial data.
- **Glossary**: one definition of "active user" or "GMV" shared across teams.
- **Data mesh** ideas: domain teams own their data as products, with a central platform and shared standards. Useful vocabulary for interviews.

#### Pitfalls
- A catalog that nobody updates, which becomes worse than none.
- Governance as gatekeeping with weeks-long approval queues; automate tagging and access where possible.

You are ready to move on when you can run DataHub or OpenMetadata locally (or use dbt docs), ingest metadata from your project, and show owners, descriptions and PII tags on your key tables.

Key concepts: Technical vs discovery catalogs, Metadata and documentation, Ownership and certification, PII classification and tags, Business glossary, DataHub and OpenMetadata, Unity Catalog, Data mesh principles.

Mini project: Run OpenMetadata or DataHub with Docker, connect it to your Postgres or DuckDB and dbt project, and document five tables with owners, descriptions, PII tags and a glossary term for GMV.

Self-check: What is the difference between the Glue Data Catalog and a discovery tool like DataHub, and why might a company need both?

Resources:
- [DataHub documentation](https://datahubproject.io/docs/) (DataHub)
- [OpenMetadata documentation](https://docs.open-metadata.org/) (OpenMetadata)
- [How to move beyond a monolithic data lake to a distributed data mesh](https://martinfowler.com/articles/data-monolith-to-mesh.html) (Martin Fowler)

### Data Lineage

recommended · intermediate · about 3 h · https://www.internhack.in/roadmaps/tracks/data-engineer/lineage

Trace where data comes from and where it goes, at table and column level, using dbt, OpenLineage and catalog tools for impact analysis and debugging.

Lineage is the map of how data flows: this dashboard reads this mart, which is built from these staging models, which come from these source tables. It turns "the number looks wrong" into a focused investigation.

#### Why lineage matters
- **Impact analysis**: before changing or dropping a column, see every downstream model and dashboard affected.
- **Root cause analysis**: trace a bad number upstream to the failing source.
- **Compliance**: show where personal data flows, which privacy laws require.
- **Cleanup**: find unused tables nobody depends on.

#### Levels of lineage
- **Table-level**: which tables feed which.
- **Column-level**: which source columns produce a given output column. Harder but much more useful for PII tracking.
- **Job-level**: which runs produced which data versions.

#### How lineage is collected
- **Parsing SQL** (dbt builds lineage from ref and source; tools parse warehouse query logs).
- **Runtime events**: **OpenLineage** is an open standard; Airflow, Spark, dbt and Flink integrations emit lineage events to a backend such as Marquez or a catalog.
- **Platform-native** lineage in Unity Catalog, BigQuery and Dataplex, and Snowflake.

#### Pitfalls
- Lineage gaps from custom scripts that bypass instrumented tools.
- Trusting table-level lineage for PII questions that need column-level detail.

You are ready to move on when you can show the lineage graph of your project from source to dashboard, and use it to list everything affected if you renamed one source column.

Key concepts: Impact analysis, Root cause tracing, Table vs column lineage, OpenLineage standard, Marquez, Lineage in dbt docs.

Mini project: Enable OpenLineage in your Airflow or Spark setup and send events to Marquez (Docker), or use your catalog's lineage view. Produce a lineage diagram from source to a final mart and write an impact analysis for renaming one column.

Self-check: Why is column-level lineage needed to answer 'where does customer phone number data end up?'

Resources:
- [OpenLineage](https://openlineage.io/) (OpenLineage)
- [dbt documentation](https://docs.getdbt.com/docs/introduction) (dbt Labs)
- [DataHub documentation](https://datahubproject.io/docs/) (DataHub)

### Data Security and Privacy

core · intermediate · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/data-security-privacy

Protect data with access control, masking, encryption and retention, and handle personal data in line with India's DPDP Act and global laws like GDPR.

Data engineers hold the keys to the most sensitive data in a company: names, phone numbers, Aadhaar-linked details, payment data, health records. Mistakes here become headlines and legal problems.

#### Access control
- **Role-based access control (RBAC)**: grant access to roles, not individuals.
- **Least privilege**: analysts get gold tables, not raw PII.
- **Row-level security** (a regional manager sees only their state) and **column-level security** or **dynamic masking** (show only the last 4 digits of a phone number).
- Service accounts per pipeline with only the permissions they need.

#### Protecting PII
- **Classify** sensitive columns early and tag them.
- **Pseudonymise** with hashing or tokenisation where analysis does not need raw values. Hash with a salt; unsalted hashes of phone numbers are easy to reverse.
- **Minimise**: do not copy PII into tables that do not need it.
- **Retention**: delete data you no longer need; lifecycle rules and scheduled purges.
- **Deletion requests**: table formats with DELETE support (Delta, Iceberg) and lineage make "erase this user" feasible.

#### The law
- India's **Digital Personal Data Protection Act, 2023 (DPDP Act)** and its rules set obligations on consent, purpose limitation, security safeguards, breach notification and data principal rights.
- Sector rules apply too, such as RBI's payment data localisation requirements.
- **GDPR** applies when handling EU residents' data, common in GCCs serving global clients.
Legal teams interpret the law; your job is to build systems that make compliance possible.

#### Pitfalls
- Copying production PII into dev environments.
- Sharing data via public links or personal drives.
- Logging full records containing PII in pipeline logs.

You are ready to move on when you can implement role-based access and a masking policy on a PII column in your warehouse, and explain how your pipeline would handle a user's deletion request.

Key concepts: RBAC and least privilege, Row and column level security, Dynamic data masking, Hashing and tokenisation, Retention and deletion requests, DPDP Act 2023 basics, GDPR basics, RBI data localisation.

Mini project: In your warehouse (or Postgres with views and roles), create analyst and engineer roles, mask phone numbers for analysts, add row-level filtering by state, and write a script that deletes a given user's data across all your tables, verified by lineage.

Self-check: Why is an unsalted SHA-256 hash of a 10-digit Indian mobile number not real protection?

Resources:
- [Ministry of Electronics and IT (DPDP Act)](https://www.meity.gov.in/) (Government of India)
- [PostgreSQL row security policies](https://www.postgresql.org/docs/current/ddl-rowsecurity.html) (PostgreSQL)
- [Snowflake documentation (access control)](https://docs.snowflake.com/) (Snowflake)

### Cost and Performance Engineering

core · advanced · about 4 h · https://www.internhack.in/roadmaps/tracks/data-engineer/cost-performance

Measure and reduce the cost of warehouses, clusters and storage while keeping pipelines fast, using FinOps habits and concrete optimisation techniques.

Data platforms are often one of the biggest lines on a company's cloud bill. Engineers who can cut cost without hurting users are valued highly, especially in cost-conscious Indian startups.

#### Know where the money goes
- **Compute**: warehouse credits or slots, Spark clusters, streaming jobs running 24x7.
- **Storage**: usually cheaper, but duplicate copies, old snapshots and unexpired time travel add up.
- **Data transfer**: cross-region and internet egress.
- **Tools**: per-row ingestion pricing and SaaS licences.
Use billing exports, warehouse query history and tags to attribute cost to teams and pipelines.

#### Common savings
- Select fewer columns; partition and cluster large tables; filter early.
- Switch frequent full refreshes to incremental models.
- Right-size warehouses and clusters; auto-suspend and auto-terminate; use spot instances for batch.
- Materialize expensive, frequently used logic once instead of recomputing in every dashboard query.
- Compact small files and expire old snapshots.
- Lower refresh frequency where the business does not need it (hourly vs every 5 minutes).
- Delete unused tables and pipelines; lineage and usage stats tell you which.

#### Performance vs cost
Faster is not always cheaper: a bigger warehouse may finish sooner for a similar cost, or may just burn credits. Measure **cost per pipeline run** and **cost per query** alongside latency, and agree SLAs so you do not over-engineer freshness.

#### FinOps culture
Budgets, alerts, regular cost reviews and showing teams their own spend. The FinOps Foundation has good free material.

#### Pitfalls
- Optimising a pipeline that costs very little while ignoring the top three spenders.
- Cutting cost by removing tests or monitoring.

You are ready to move on when you can produce a cost breakdown for your project's pipelines, identify the top cost driver, apply one optimisation and show the measured saving.

Key concepts: Compute, storage and egress costs, Cost attribution and tagging, Query optimisation for cost, Right-sizing and auto-suspend, Incremental vs full refresh savings, Spot instances, FinOps practices.

Mini project: Using your warehouse's query history (BigQuery INFORMATION_SCHEMA jobs or Snowflake query history), list the 10 most expensive queries in your project, optimise the top two and report bytes or credits before and after.

Self-check: A dashboard refreshes every 5 minutes but users check it twice a day. What would you change, and how would you justify it to the stakeholder?

Resources:
- [BigQuery documentation (cost and performance)](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [Snowflake documentation (cost management)](https://docs.snowflake.com/) (Snowflake)
- [FinOps Foundation](https://www.finops.org/) (FinOps Foundation)

## Portfolio Projects and Interview Preparation

Turn your skills into offers: build end-to-end projects that recruiters can run, practise data engineering system design, and prepare for SQL, coding, Spark and behavioural rounds.

### Building a Data Engineering Portfolio

core · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/data-engineer/portfolio-projects

Choose and present portfolio projects that prove real data engineering skill: clear architecture, reproducible setup, tests, and a write-up of trade-offs.

Recruiters cannot see your learning, only your artifacts. For freshers without industry experience, two or three strong, well-documented projects matter more than ten certificates.

#### What makes a project credible
- **Real or realistic data**: data.gov.in, Indian Railways, AQI, IPL ball-by-ball, stock market data, GitHub events, or a simulated event stream. Avoid only Titanic-style toy CSVs.
- **End-to-end flow**: ingestion, storage, transformation, quality checks, orchestration and a final consumer (dashboard or API).
- **Engineering practices**: Git history, tests, CI, Docker, infrastructure as code, idempotent jobs, logging.
- **A clear README**: problem, architecture diagram, tech choices with reasons, how to run it in one command, screenshots, and what you would improve.

#### Project ideas by focus
- **Batch and modeling**: daily ingestion of an API into a lakehouse, dbt star schema, Metabase or Looker Studio dashboard.
- **Spark**: process a multi-GB dataset with PySpark, documenting tuning decisions.
- **Streaming**: simulated UPI or delivery events through Kafka to Spark Structured Streaming or Flink, with a live metric.
- **Platform**: a small self-hosted stack (Airflow, MinIO, Postgres, dbt) in Docker Compose with monitoring.

#### Presenting it
- Pin projects on GitHub; keep the main branch working.
- Write a short blog post or LinkedIn post explaining one hard problem you solved.
- Show numbers: rows processed, runtime, cost, test coverage.

#### Pitfalls
- Copying a tutorial project unchanged; reviewers recognise them. Change the dataset and add your own features.
- Projects that cannot run because of hard-coded paths or expired keys.

You are ready to move on when one project in your GitHub can be cloned and run with a single command by a stranger, and its README explains every major design choice.

Key concepts: Choosing datasets, End-to-end architecture, README and architecture diagram, One-command reproducibility, Tests and CI in projects, Blog posts and write-ups, Open source contributions.

Mini project: Pick one portfolio project idea, write a one-page design document (sources, architecture, tools, data model, tests, schedule), and get feedback from a peer or mentor before building.

Self-check: Look at your best project's README. Could a recruiter understand what it does and why in 60 seconds? What is missing?

Resources:
- [Data Engineering Zoomcamp (projects)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [Open Government Data Platform India](https://data.gov.in/) (Government of India)
- [Kaggle datasets](https://www.kaggle.com/datasets) (Kaggle)

### Capstone: An End-to-End Data Platform

recommended · advanced · about 40 h · https://www.internhack.in/roadmaps/tracks/data-engineer/capstone

Build one production-style platform that combines ingestion, a lakehouse or warehouse, dbt, orchestration, quality checks, streaming or Spark, and a dashboard.

The capstone pulls everything together into one project you can talk about for 30 minutes in an interview. Plan it like a real system and build it in stages.

#### Suggested scope
A "city mobility" or "quick commerce analytics" platform:
1. **Sources**: a public API (for example weather or transit data), a Postgres database of simulated orders, and a Kafka stream of simulated events.
2. **Ingestion**: Python extractor with incremental watermarks; CDC or incremental extract from Postgres; Kafka producer.
3. **Storage**: object storage (MinIO, S3 or GCS) with bronze, silver, gold Delta or Iceberg tables, or a cloud warehouse.
4. **Processing**: PySpark batch job for heavy cleaning; Structured Streaming or Flink for a live metric.
5. **Modeling**: dbt with staging, a star schema, an SCD Type 2 snapshot and incremental facts.
6. **Quality**: dbt tests, a validation step on raw data, freshness monitoring.
7. **Orchestration**: Airflow, Dagster or Prefect DAG with backfills.
8. **Serving**: a dashboard in Metabase, Superset or Looker Studio.
9. **Ops**: Docker Compose or Terraform, CI, README with diagrams and cost notes.

#### Build in stages
Get a thin slice working end to end first (one source, one model, one chart), then deepen each layer. A working simple system beats an unfinished ambitious one.

#### What to document
Architecture diagram, data model diagram, decisions and trade-offs (why Delta over Iceberg, why batch here and streaming there), failure scenarios and how the system recovers, and known limitations.

#### Pitfalls
- Trying to build all layers at once and finishing none.
- Using every tool in the track just to list them; each choice should have a reason.

You are ready to move on when the capstone runs end to end from a fresh clone, survives a forced task failure and rerun without duplicates, and you can whiteboard its architecture from memory.

Key concepts: Thin slice first, Batch and streaming paths, Lakehouse or warehouse layer, dbt modeling and tests, Orchestration with backfills, Dashboard serving layer, Failure and recovery demo, Design decision log.

Mini project: Build the capstone in four weekly milestones: (1) thin slice end to end, (2) dbt star schema with tests, (3) orchestration with backfills and quality gates, (4) streaming metric and documentation. Record a 5-minute demo video.

Self-check: If your capstone's daily ingestion fails for three days in a row, walk through exactly how you would detect it, fix it and backfill without duplicates.

Resources:
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [Apache Airflow documentation](https://airflow.apache.org/docs/) (Apache Airflow)
- [dbt documentation](https://docs.getdbt.com/docs/introduction) (dbt Labs)
- [Metabase documentation](https://www.metabase.com/docs/latest/) (Metabase)

### Data Engineering System Design

core · advanced · about 10 h · https://www.internhack.in/roadmaps/tracks/data-engineer/system-design

Answer open-ended design questions by clarifying requirements, estimating scale, choosing batch or streaming, designing storage and models, and discussing reliability and trade-offs.

Mid-level and many fresher interviews at product companies include a design round: "design the data pipeline for ride analytics" or "how would you build a real-time fraud signal for UPI payments?". There is no single right answer; interviewers assess structure and trade-offs.

#### A repeatable framework
1. **Clarify requirements**: who consumes the data, what questions, latency (seconds, minutes, daily), accuracy needs, retention.
2. **Estimate scale**: events per second, daily volume, growth. For example, 10 million orders a day is about 115 per second on average, with peaks several times higher during sales.
3. **Sources and ingestion**: batch extracts, CDC or event streams.
4. **Storage**: lake, warehouse or lakehouse; file formats; partitioning.
5. **Processing**: batch vs streaming, engines, idempotency, late data.
6. **Modeling and serving**: star schema, aggregates, real-time stores or APIs.
7. **Reliability**: retries, backfills, exactly-once vs at-least-once with dedup, monitoring and alerting.
8. **Governance and cost**: PII handling, access, cost drivers.
9. **Trade-offs**: state what you would simplify for v1 and what you would add later.

#### Common prompts to practise
Clickstream analytics for an e-commerce app, a daily finance reconciliation pipeline, real-time delivery ETA metrics, a CDC pipeline from 50 microservice databases, a feature store for ML, and a data platform for a new startup on a tight budget.

#### Pitfalls
- Jumping to tools ("Kafka and Spark!") before clarifying requirements.
- Ignoring failure modes, backfills and data quality.
- Over-engineering: streaming everything when daily batch meets the need.

You are ready to move on when you can talk through two different design prompts for 30 minutes each, drawing the architecture, estimating scale and defending your trade-offs.

Key concepts: Requirement clarification, Back-of-envelope estimation, Batch vs streaming decisions, Storage and partitioning choices, Reliability and backfills, Cost and governance in design, Communicating trade-offs.

Mini project: Write full design documents for two prompts (clickstream analytics and a UPI fraud signal), each with an architecture diagram, scale estimates, data model and a trade-offs section. Do a mock design interview with a peer.

Self-check: For a clickstream of 50,000 events per second, what latency would you offer for product dashboards, and how does that choice change your architecture?

Resources:
- [System Design Primer](https://github.com/donnemartin/system-design-primer) (GitHub)
- [Data Engineering Zoomcamp](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)
- [Apache Kafka documentation](https://kafka.apache.org/documentation/) (Apache Kafka)

### Data Engineering Interview Preparation

core · intermediate · about 20 h · https://www.internhack.in/roadmaps/tracks/data-engineer/interview-prep

Prepare for the typical rounds: SQL, Python coding, Spark and big data concepts, data modeling, project deep dives and behavioural questions.

Data engineering interviews in India follow a fairly predictable pattern. Prepare for each round deliberately rather than only grinding one type of question.

#### Typical rounds
- **Online assessment**: SQL queries plus easy to medium Python or DSA problems.
- **SQL round**: window functions, top-N per group, dedup, running totals, gaps and islands, joins with NULLs. Speak your logic aloud.
- **Python and coding**: string and dict manipulation, parsing logs or JSON, simple algorithms. Product companies may ask medium DSA (arrays, hashing, two pointers).
- **Big data concepts**: Spark architecture, shuffles, broadcast joins, skew, partitioning, file formats, Kafka partitions and consumer groups, lakehouse formats.
- **Data modeling**: design a star schema, handle SCD Type 2, choose grain.
- **Project deep dive**: be ready to explain every decision and failure in your projects. This is where portfolio work pays off.
- **Behavioural**: ownership, handling a pipeline failure, disagreeing with a stakeholder. Use the STAR format.

#### A practice plan
- Daily: two or three SQL problems (LeetCode SQL 50, DataLemur, StrataScratch-style questions).
- Three times a week: Python problems.
- Weekly: one modeling exercise and one system design prompt.
- Keep a document of concepts you got wrong and revisit it.

#### Resume tips
One page, projects with numbers (processed 20 GB daily, cut runtime by 60 percent), the tools you actually used, and links to GitHub. Tailor keywords to each job description honestly.

#### Pitfalls
- Memorising definitions without being able to apply them to a scenario.
- Overclaiming tools on your resume and getting caught in follow-up questions.

You are ready to apply when you can solve medium SQL window function problems in under 10 minutes, explain a Spark job's stages and a skew fix, design a star schema on a whiteboard, and walk through your capstone confidently.

Key concepts: SQL interview patterns, Python coding questions, Spark and big data concepts, Data modeling questions, Project deep dives, Behavioural and STAR answers, Resume for data engineers, Mock interviews.

Mini project: Run a four-week prep sprint: 60 SQL problems, 20 Python problems, 4 modeling exercises, 4 system design prompts and 2 mock interviews. Track scores and weak areas in a spreadsheet.

Self-check: Explain, as you would to an interviewer, how you would find the second highest salary per department, and how your answer handles ties.

Resources:
- [LeetCode Top SQL 50](https://leetcode.com/studyplan/top-sql-50/) (LeetCode)
- [DataLemur SQL interview questions](https://datalemur.com/) (DataLemur)
- [Tech Interview Handbook](https://www.techinterviewhandbook.org/) (Tech Interview Handbook)

## Related

- [Career roadmaps](https://www.internhack.in/roadmaps)
