Skip to content

About

Hands-on data engineering practice problems with notebooks: SCD2, incremental loads, joins, sessionization and data quality.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

NullTrap

Practice problems for real data engineering work, in SQL and PySpark.

Site: https://rishikesh8pandey.github.io/data-engineering-practice/

Every problem comes from something that goes wrong in real pipelines: duplicates, late-arriving data, NULLs in the wrong place, joins that multiply rows, windows that count the wrong thing. Each one has a small synthetic dataset with the awkward cases planted in it, and a check that tells you whether your result is right without showing you the answer.

How to use it

  1. Pick a problem below and read the statement on the site.
  2. Solve it. The 19 SQL problems can be solved in the browser, with nothing to install. Every problem also has a Google Colab notebook, which needs a Google account and nothing else.
  3. Run the check. It compares a fingerprint of your result with the expected one and gives a hint when they differ: a missing column, a wrong row count, the column whose values are off.
  4. Read the explanation on the problem page: the approach, the common wrong answers and why they are wrong.

Problems

40 problems: 19 SQL, 11 PySpark, 10 Debug the AI.

# Problem Track Difficulty Notebook
1 Revenue per customer is higher than the ledger Debug the AI Easy Open in Colab
2 Keep the latest record per customer SQL Easy Open in Colab
3 The incremental load that loses late events PySpark Medium Open in Colab
4 Build SCD2 history from repeated saves SQL Medium Open in Colab
5 The running balance that jumps ahead Debug the AI Medium Open in Colab
6 A data quality report that counts NULLs correctly SQL Easy Open in Colab
7 Sessionize page views with a 30-minute gap PySpark Medium Open in Colab
8 The union that swaps two columns Debug the AI Easy Open in Colab
9 Merge overlapping coverage periods SQL Hard Open in Colab
10 Convert each transaction with the rate valid at the time PySpark Hard Open in Colab
11 Top three products per category, ties included SQL Easy Open in Colab
12 The average rating where NULL is not zero SQL Easy Open in Colab
13 The LEFT JOIN that a WHERE clause quietly undoes SQL Easy Open in Colab
14 The daily report that is five and a half hours off Debug the AI Medium Open in Colab
15 Daily revenue with the missing days filled in SQL Medium Open in Colab
16 Month-over-month change when a month is missing SQL Medium Open in Colab
17 Order totals that grow after explode PySpark Medium Open in Colab
18 The regions that sold nothing, according to the join Debug the AI Medium Open in Colab
19 Which tier was the customer in when they ordered? SQL Medium Open in Colab
20 Apply a batch of changes to an SCD2 table PySpark Hard Open in Colab
21 Order statuses as columns, with zeros where there are none SQL Easy Open in Colab
22 The invoice numbers that sort like words SQL Easy Open in Colab
23 Conversion rates when the denominator is zero SQL Easy Open in Colab
24 Monthly active users are not the sum of the days SQL Medium Open in Colab
25 Revenue by category when a product sits in several SQL Medium Open in Colab
26 Fill the gaps in sensor readings with the last known value SQL Medium Open in Colab
27 Collapse double-clicks into one click SQL Medium Open in Colab
28 The longest login streak SQL Hard Open in Colab
29 A three-step funnel, in order, within seven days SQL Hard Open in Colab
30 Everything except LOW, which quietly excludes the unknowns PySpark Easy Open in Colab
31 Amounts that arrive as text PySpark Easy Open in Colab
32 JSON payloads that changed shape PySpark Medium Open in Colab
33 Customers to date, counted once PySpark Medium Open in Colab
34 Reconcile a target table against its source PySpark Hard Open in Colab
35 One golden record from three systems PySpark Hard Open in Colab
36 The bucket no order ever lands in Debug the AI Easy Open in Colab
37 The city average that no order adds up to Debug the AI Easy Open in Colab
38 The month that ends a day early Debug the AI Medium Open in Colab
39 Seven rows are not seven days Debug the AI Medium Open in Colab
40 The load that never updates anything Debug the AI Medium Open in Colab

Found a mistake?

Open an issue: https://github.com/rishikesh8pandey/data-engineering-practice/issues

This repository is build output (the website and the notebooks). Changes made here by hand are overwritten by the next build, so please report problems instead of sending pull requests against the HTML.

About

Hands-on data engineering practice problems with notebooks: SCD2, incremental loads, joins, sessionization and data quality.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages