{"id":"6aecf642296f6ef4c893d967","_id":"6aecf642296f6ef4c893d967","slug":"data-engineering-masterclass","__v":0,"authorId":"6936f979d7261087a227d955","categories":["Technology & Data","Career & Work"],"certificateAvailable":true,"createdAt":"2026-11-05T21:33:54.400Z","description":"The most hands-on course in the catalogue: you build a real data platform for NaijaMart, a fictional Nigerian e-commerce company, from raw CSVs and an API all the way to a tested, scheduled, monitored warehouse and a live dashboard. Across eight modules you learn SQL, Python, data modelling, dbt, Apache Airflow, Spark, Kafka, BigQuery, data-quality checks and CI with GitHub Actions, using only free and open-source tools that run on an 8 GB laptop. Every lesson has a lab with copy-paste commands, expected output and fixes for the errors Windows and Mac users actually hit, and every module adds a working piece to one GitHub repo that you finish as a portfolio project you can show an employer. Written for Nigerian graduates, analysts, developers and career-switchers with no prior SQL or Python.","discount":0,"duration":1680,"enrolledStudents":0,"featured":false,"instructorId":{"_id":"6936f979d7261087a227d955","displayName":"Mindalitix"},"instructorName":"Mindalitix","instructorProfile":{"_id":"6936f979d7261087a227d955","displayName":"Mindalitix","email":"instructor@mindalitix.com","about":"Default instructor for Mindalitix courses.","education":[],"workExperience":[],"rating":5,"createdAt":"2025-12-09T22:27:58.293Z","updatedAt":"2025-12-09T22:27:58.293Z","__v":0},"level":"all-levels","modules":[{"id":"module_1793914434397_sj3w0ll","_id":"6aecf642296f6ef4c893d970","title":"Module 1: Foundations and Setup","lessons":[{"id":"lesson_1793914434397_zxqocgr","_id":"6aecf642296f6ef4c893d971","title":"Lesson 1: What a Data Engineer Actually Does","type":"video","duration":34,"content":"# Lesson 1: What a Data Engineer Actually Does\n\nNaijaMart's finance team asks a simple question every Monday: \"How much did we actually collect last week, by state?\" Nobody can answer it quickly, because the answer is spread across five systems that disagree with each other. Making that answer boring and reliable is the data engineer's job, and it is what you will learn to do in this course.\n\n## Outcome\nBy the end you can generate NaijaMart's raw data on your own laptop and explain, using three of its real flaws, why a company needs a data engineer before it can trust its own numbers.\n\n## Concept\n\n### The problem a data engineer solves\n\nEvery company that sells things online produces data as a side effect of doing business. When a customer in Ibadan orders a carton of noodles on NaijaMart, at least four systems write something down:\n\n* the **shop's database** records the order (who, what, when, how much);\n* **Paystack** or **Flutterwave** records the payment attempts, in **kobo** (1 naira = 100 kobo, so ₦12,550 is stored as 1,255,000 kobo);\n* the **courier** (say, Kwara Dispatch) records when the parcel left the warehouse and when it arrived;\n* the **warehouse** logs a power outage, because the grid went off and the generator took twenty minutes to come on (a \"NEPA log\", in everyday Nigerian speech).\n\nEach system was built by a different team to do its own job well. None of them was built to answer the finance team's question. The shop's database is busy taking new orders; running a heavy report on it at 9 a.m. on Monday slows checkout for real customers. Paystack's dashboard knows about payments but not about which state the parcel went to. The courier's spreadsheet uses \"Lagos State\" where the shop uses \"Lagos\".\n\nA **data engineer** builds and runs the systems that move data out of those sources, clean it, combine it, and store it somewhere that analysts, managers and machine-learning models can query safely and repeatedly. The short version: data engineers make data **available, correct and on time**.\n\n### The pipeline, in one picture\n\n```text\n  SOURCES                 INGEST              STORE + TRANSFORM               SERVE\n  -------                 ------              -----------------               -----\n  Shop database   --+\n  Paystack API    --+-->  extract/load  -->   raw  -->  staging  -->  marts  -->  dashboards\n  Courier CSVs    --+     (Python,            (PostgreSQL, DuckDB,             reports\n  NEPA logs       --+      scheduled)          BigQuery; dbt models)           ML features\n                                   ^                                      |\n                                   +---- orchestration, tests, monitoring +\n```\n\nSome words you will use all course:\n\n* **Source**: any system that produces data you need (a database, an API, a file someone emails you every day).\n* **Pipeline**: a repeatable series of steps that moves data from sources to a destination. \"Repeatable\" is the important word. A pipeline you can only run by hand, once, while concentrating, is not a pipeline.\n* **Extract, load, transform**: pull the data out, put it somewhere you control, then reshape it. Module 5 explains why modern teams often load first and transform afterwards.\n* **Warehouse**: a database designed for questions about lots of history (\"sales by state for 18 months\") rather than for taking one order at a time.\n* **Orchestrator**: a scheduler that runs pipeline steps in the right order, retries failures and tells you when something broke (Airflow, in Module 6).\n* **Data quality check**: an automated test on the data itself, for example \"no order has a negative total\".\n\n### What the work looks like day to day\n\nStrip away the job titles and most data engineering work falls into a handful of activities:\n\n1. **Building ingestion.** Writing code that pulls orders from an API page by page, handles the API saying \"slow down\" (HTTP 429), and lands the results without duplicating anything.\n2. **Modelling and transforming.** Turning messy raw tables into clean, documented ones: one row per order, states spelled one way, amounts in one unit.\n3. **Scheduling and monitoring.** Making the whole thing run every night at 2 a.m., and making sure someone finds out at 7 a.m. if it failed, before the finance team does.\n4. **Fixing what breaks.** A source system changes a column name. A courier starts sending dates as DD/MM/YYYY. A file arrives twice. This is a large share of the real job, and it is why we use deliberately dirty data.\n5. **Talking to people.** Asking the finance team what \"collected\" means. Does a pay-on-delivery order count before the rider brings the cash back? You cannot answer that in code; you have to ask.\n\n### Data engineer, data analyst, data scientist: an honest comparison\n\nThese three roles overlap, and companies use the titles loosely. A small Lagos startup may have one person doing all three. Here is how the work usually divides:\n\n| | Data engineer | Data analyst | Data scientist |\n|---|---|---|---|\n| Main question | \"Is the data there, correct and on time?\" | \"What happened, and why?\" | \"What will happen, and what should we do?\" |\n| NaijaMart example | Builds the nightly pipeline that loads Paystack payments and dedupes orders | Builds the weekly sales-by-state dashboard and explains the dip in Kano | Builds a model predicting which orders will be returned |\n| Daily tools | SQL, Python, Git, Docker, dbt, Airflow, cloud warehouses | SQL, spreadsheets, BI tools (Looker Studio, Power BI, Metabase) | Python, statistics, notebooks, ML libraries |\n| What \"done\" means | It runs every day without anyone touching it | A stakeholder made a decision with it | A model is measurably better than a simple rule |\n| Who notices when it breaks | Everyone downstream | The person reading the report | The team using the predictions |\n\nSome honest observations:\n\n* **The work is less glamorous than the job adverts suggest.** A lot of it is plumbing: reading error messages, reading other people's code, and fixing a pipeline that broke because a vendor changed a file format. If you enjoy making things reliable, it is satisfying. If you want to present insights to the board every week, the analyst path may suit you better.\n* **SQL is shared by all three roles**, which is why Module 2 is long. Python matters more for engineers and scientists than for analysts.\n* **Engineers are usually a step removed from business decisions.** Your work enables decisions rather than making them. That can feel invisible, until the dashboard is wrong and everyone suddenly knows your name.\n* **Many data engineers started as analysts or software developers.** If you are an analyst now, the step across is mostly about software habits (version control, testing, automation), which this course teaches.\n\nThis course does not quote salaries or job counts. They change quickly, vary hugely between a Lagos fintech and a remote role, and any number written here would be stale by the time you read it. If you want a feel for the market, search current listings on job boards and LinkedIn for \"data engineer\" in your city and read the requirements sections. That will tell you more than a headline figure.\n\n### Why NaijaMart's data is dirty on purpose\n\nReal exports are messy, and learning on clean data teaches you nothing about the job. The NaijaMart generator you run below plants specific problems that later modules fix:\n\n* about 1% of orders are **exported twice** (exact duplicate rows);\n* state names arrive as `Lagos`, `lagos`, `LAGOS ` (with a trailing space), `Lagos State`, `FCT`, `Abuja`, `FCT Abuja` and `fct`;\n* about 2% of order timestamps use a legacy `DD/MM/YYYY HH:MM` format instead of ISO 8601;\n* some customers have blank emails or phone numbers;\n* payments are in **kobo** while orders are in **naira**;\n* a customer can have a failed or abandoned Paystack attempt before a successful one, so payments and orders are not one-to-one.\n\nIf you summed `total_amount_ngn` in the orders file as it stands, the duplicate rows alone would inflate the total. That is the kind of error a data engineer exists to prevent.\n\n### What you will build\n\nAcross eight modules you build one GitHub repository, `naijamart-data-platform`. By the end it ingests CSV exports and a mock API, loads PostgreSQL and a Parquet data lake, models a star-schema warehouse with dbt, runs on a daily Airflow schedule, processes clickstream with Spark, streams order events through Kafka, checks quality with Great Expectations, runs CI with GitHub Actions, and feeds a dashboard. Every tool is free or open source and runs on an 8 GB laptop. This lesson starts that repository with its first file.\n\n## Watch\nThe video above this lesson walks through what a data engineer does, using the same pipeline stages as the diagram in Concept. As you watch, map each thing the presenter describes onto NaijaMart: which of our sources, and which of the five activities.\n\n### Walkthrough\nThere is no walkthrough video for this lab, because it runs the course's own data generator, which no one else has filmed. The lab steps below show every command and its real output.\n\n**Deep dive (optional, long):** [What does a Data Engineer Do All Day? (Real Work Explained)](https://www.youtube.com/watch?v=OdRIMzknQcY): Data with Baraa describes a working day in more detail, including meetings and incidents.\n\n## Tools used in this lesson\n| Tool | What it is for | Download / sign up | Docs | Free? |\n|---|---|---|---|---|\n| Python 3 | Runs the data generator (any Python 3.9 or newer works for this one script) | [python.org/downloads](https://www.python.org/downloads/) | [docs.python.org/3.12](https://docs.python.org/3.12/) | Yes, open source (PSF licence) |\n| A text editor | Saving the script; VS Code arrives in Lesson 4 | Any editor you already have | - | Yes |\n\n## Hands-on lab\n\nThis lab creates the project folder, saves the generator script, runs it, and inspects three of the planted problems. It assumes the default scale (`--scale 1.0`).\n\n> **Not set up yet?** You need a terminal and Python 3.9 or newer. **macOS**: open Terminal (Lesson 3 explains how). If `python3 --version` asks to install the Command Line Tools, accept; they include a suitable Python. **Windows**: read this lab now and run it at the end of Lesson 3. The Ubuntu 24.04 you install there already includes Python 3.12. Lesson 4 installs the course's proper Python 3.12 setup on both systems.\n\n1. **Create the project folder.** Everything in this course lives in one folder in your home directory.\n\n```bash\nmkdir -p ~/naijamart-data-platform/scripts\ncd ~/naijamart-data-platform\npwd\n```\n\n**Expected output:**\n```text\n/Users/yourname/naijamart-data-platform\n```\n\n**Windows (WSL2):** the path is `/home/yourname/naijamart-data-platform`. Keep it there, in the Linux filesystem, not under `/mnt/c`.\n\n2. **Save the generator.** Create the file `scripts/generate_naijamart_data.py` and paste in the complete code below, unchanged. It uses only Python's standard library, so it needs no internet and no `pip install`. The fixed seed (42) means everyone on the course gets identical data, which is why lessons can print exact expected numbers.\n\nTo create the file from the terminal, run `nano scripts/generate_naijamart_data.py`, paste, then press <kbd>Ctrl</kbd>+<kbd>O</kbd>, <kbd>Enter</kbd>, <kbd>Ctrl</kbd>+<kbd>X</kbd>. Lesson 3 covers nano properly.\n\n```python\n\"\"\"\nGenerate NaijaMart's raw data: the fictional Nigerian e-commerce company whose data\nplatform you build in the Data Engineering Masterclass.\n\nStandard library only, so it runs on a fresh Python with no internet:\n\n    python scripts/generate_naijamart_data.py                 # default size (~60 MB)\n    python scripts/generate_naijamart_data.py --scale 0.2     # small, for slow laptops\n    python scripts/generate_naijamart_data.py --scale 3       # bigger, for the Spark module\n\nSame --seed, same data, on every machine. That is what lets the course print the\nexpected output of each lab.\n\nThe data is deliberately a little dirty, the way real exports are:\n  * about 1% of orders are exported twice (exact duplicate rows)\n  * state names are inconsistent (\"Lagos\", \"lagos\", \"LAGOS \", \"FCT\", \"Abuja\")\n  * about 2% of order timestamps are DD/MM/YYYY HH:MM instead of ISO 8601\n  * some customer emails and phone numbers are blank\n  * Paystack-style payment amounts are in kobo (1 naira = 100 kobo), orders in naira\n  * a handful of order_items have quantity 0 or a negative unit price\n\"\"\"\nimport argparse\nimport csv\nimport json\nimport os\nimport random\nfrom datetime import datetime, timedelta\n\nSTATES = [\n    (\"Lagos\", [\"Ikeja\", \"Lekki\", \"Surulere\", \"Yaba\", \"Ikorodu\", \"Ajah\"], 30),\n    (\"FCT\", [\"Garki\", \"Wuse\", \"Maitama\", \"Kubwa\", \"Gwarinpa\"], 12),\n    (\"Rivers\", [\"Port Harcourt\", \"Obio-Akpor\", \"Bonny\"], 8),\n    (\"Oyo\", [\"Ibadan\", \"Ogbomosho\", \"Oyo\"], 7),\n    (\"Kano\", [\"Kano\", \"Fagge\", \"Nassarawa\"], 7),\n    (\"Kaduna\", [\"Kaduna\", \"Zaria\"], 5),\n    (\"Enugu\", [\"Enugu\", \"Nsukka\"], 5),\n    (\"Anambra\", [\"Awka\", \"Onitsha\", \"Nnewi\"], 5),\n    (\"Delta\", [\"Asaba\", \"Warri\", \"Sapele\"], 5),\n    (\"Ogun\", [\"Abeokuta\", \"Ijebu-Ode\", \"Sagamu\", \"Ota\"], 6),\n    (\"Edo\", [\"Benin City\", \"Ekpoma\"], 4),\n    (\"Kwara\", [\"Ilorin\", \"Offa\"], 3),\n    (\"Plateau\", [\"Jos\", \"Bukuru\"], 3),\n]\n# How the same state arrives from different systems. The cleaning labs fix this.\nSTATE_VARIANTS = {\"Lagos\": [\"lagos\", \"LAGOS \", \"Lagos State\"], \"FCT\": [\"Abuja\", \"FCT Abuja\", \"fct\"]}\nFIRST = [\"Adaeze\", \"Chinedu\", \"Ngozi\", \"Emeka\", \"Funmilayo\", \"Tunde\", \"Aisha\", \"Ibrahim\", \"Bisi\", \"Kelechi\",\n         \"Zainab\", \"Olumide\", \"Amaka\", \"Yusuf\", \"Temitope\", \"Obinna\", \"Hauwa\", \"Segun\", \"Ifeoma\", \"Musa\",\n         \"Chiamaka\", \"Babatunde\", \"Fatima\", \"Uche\", \"Damilola\", \"Sani\", \"Nkechi\", \"Femi\", \"Halima\", \"Ikenna\"]\nLAST = [\"Okafor\", \"Adeyemi\", \"Bello\", \"Eze\", \"Ogunleye\", \"Abubakar\", \"Nwosu\", \"Balogun\", \"Okeke\", \"Lawal\",\n        \"Ibrahim\", \"Adebayo\", \"Obi\", \"Musa\", \"Onyeka\", \"Afolabi\", \"Yakubu\", \"Chukwu\", \"Ojo\", \"Danjuma\"]\nCATEGORIES = {\n    \"Phones & Tablets\": ([\"Tecno\", \"Infinix\", \"Samsung\", \"itel\", \"Xiaomi\"], (45000, 650000)),\n    \"Electronics\": ([\"Hisense\", \"LG\", \"Nexus\", \"Scanfrost\", \"Sony\"], (15000, 900000)),\n    \"Generators & Solar\": ([\"Elepaq\", \"Sumec Firman\", \"Lutron\", \"Felicity Solar\"], (60000, 1200000)),\n    \"Groceries\": ([\"Golden Penny\", \"Dangote\", \"Indomie\", \"Peak\", \"Milo\"], (800, 25000)),\n    \"Fashion\": ([\"Ankara House\", \"Aso-Oke Co\", \"Kampala Lane\", \"Lagos Thread\"], (3500, 85000)),\n    \"Health & Beauty\": ([\"Nivea\", \"Dudu-Osun\", \"Zaron\", \"House of Tara\"], (1200, 45000)),\n    \"Home & Kitchen\": ([\"Binatone\", \"Kenwood\", \"Master Chef\", \"Royal\"], (4000, 220000)),\n}\nNOUNS = {\n    \"Phones & Tablets\": [\"Smartphone 128GB\", \"Smartphone 64GB\", \"Tablet 10-inch\", \"Feature Phone\", \"Power Bank 20000mAh\"],\n    \"Electronics\": [\"43-inch Smart TV\", \"Bluetooth Speaker\", \"Sound Bar\", \"Standing Fan\", \"Rechargeable Lamp\"],\n    \"Generators & Solar\": [\"2.5kVA Generator\", \"Solar Panel 200W\", \"Inverter 1.5kVA\", \"Lithium Battery 100Ah\"],\n    \"Groceries\": [\"Rice 25kg\", \"Spaghetti Carton\", \"Noodles Carton\", \"Evaporated Milk 12-pack\", \"Semovita 10kg\"],\n    \"Fashion\": [\"Ankara Gown\", \"Agbada Set\", \"Senator Wear\", \"Adire Shirt\", \"Leather Sandals\"],\n    \"Health & Beauty\": [\"Body Lotion 400ml\", \"Black Soap\", \"Shea Butter Tub\", \"Face Powder\", \"Hair Oil\"],\n    \"Home & Kitchen\": [\"Blender\", \"Electric Kettle\", \"Gas Cooker 4-burner\", \"Pressure Pot\", \"Microwave 20L\"],\n}\nCOURIERS = [\"Eko Express\", \"Arewa Couriers\", \"Delta Riders\", \"Kwara Dispatch\"]\nWAREHOUSES = [(\"WH-LAG-01\", \"Lagos\"), (\"WH-LAG-02\", \"Lagos\"), (\"WH-ABJ-01\", \"FCT\"), (\"WH-PHC-01\", \"Rivers\"),\n              (\"WH-KAN-01\", \"Kano\"), (\"WH-IBD-01\", \"Oyo\")]\nSTART = datetime(2025, 1, 1)\nCUTOFF = datetime(2026, 6, 30, 23, 59, 59)   # CSV exports end here; the mock API serves later orders\nAPI_END = datetime(2026, 7, 31, 23, 59, 59)\n\n\ndef weighted_state(rng):\n    total = sum(w for _, _, w in STATES)\n    pick = rng.uniform(0, total)\n    for name, cities, w in STATES:\n        pick -= w\n        if pick <= 0:\n            return name, rng.choice(cities)\n    return STATES[0][0], STATES[0][1][0]\n\n\ndef messy_state(rng, state):\n    if state in STATE_VARIANTS and rng.random() < 0.12:\n        return rng.choice(STATE_VARIANTS[state])\n    return state\n\n\ndef rand_ts(rng, start, end):\n    return start + timedelta(seconds=rng.randint(0, int((end - start).total_seconds())))\n\n\ndef iso(ts):\n    return ts.strftime(\"%Y-%m-%dT%H:%M:%S\")\n\n\ndef write_csv(path, header, rows):\n    with open(path, \"w\", newline=\"\", encoding=\"utf-8\") as f:\n        w = csv.writer(f)\n        w.writerow(header)\n        w.writerows(rows)\n    return len(rows)\n\n\ndef main():\n    ap = argparse.ArgumentParser(description=__doc__.split(\"\\n\")[1])\n    ap.add_argument(\"--scale\", type=float, default=1.0, help=\"multiply every row count (default 1.0)\")\n    ap.add_argument(\"--seed\", type=int, default=42)\n    ap.add_argument(\"--out\", default=\"data\", help=\"output folder (default ./data)\")\n    a = ap.parse_args()\n    rng = random.Random(a.seed)\n    raw = os.path.join(a.out, \"raw\")\n    api = os.path.join(a.out, \"api\")\n    os.makedirs(raw, exist_ok=True)\n    os.makedirs(api, exist_ok=True)\n\n    n_customers = max(200, int(5000 * a.scale))\n    n_orders = max(1000, int(50000 * a.scale))\n    n_api_orders = max(200, int(4000 * a.scale))\n    n_events = max(5000, int(300000 * a.scale))\n\n    # ---- products\n    products = []\n    pid = 0\n    for cat, (brands, (lo, hi)) in CATEGORIES.items():\n        for noun in NOUNS[cat]:\n            for brand in rng.sample(brands, k=min(len(brands), 3)):\n                pid += 1\n                price = round(rng.uniform(lo, hi) / 50) * 50\n                products.append([f\"P{pid:04d}\", f\"{brand} {noun}\", cat, brand, price, \"true\" if rng.random() > 0.05 else \"false\"])\n    price_of = {p[0]: p[4] for p in products}\n    counts = {\"products.csv\": write_csv(os.path.join(raw, \"products.csv\"),\n                                        [\"product_id\", \"product_name\", \"category\", \"brand\", \"unit_price_ngn\", \"is_active\"], products)}\n\n    # ---- customers\n    customers = []\n    home = {}\n    for i in range(1, n_customers + 1):\n        cid = f\"C{i:05d}\"\n        fn, ln = rng.choice(FIRST), rng.choice(LAST)\n        state, city = weighted_state(rng)\n        home[cid] = state\n        email = \"\" if rng.random() < 0.03 else f\"{fn.lower()}.{ln.lower()}{rng.randint(1, 999)}@example.com\"\n        phone = \"\" if rng.random() < 0.02 else f\"+234{rng.choice(['803', '806', '813', '816', '703', '706', '802', '808', '905', '915'])}{rng.randint(1000000, 9999999)}\"\n        signup = rand_ts(rng, datetime(2023, 1, 1), CUTOFF - timedelta(days=30))\n        channel = rng.choices([\"web\", \"android_app\", \"ios_app\", \"ussd\"], [40, 35, 15, 10])[0]\n        customers.append([cid, fn, ln, email, phone, messy_state(rng, state), city, signup.strftime(\"%Y-%m-%d\"), channel])\n    counts[\"customers.csv\"] = write_csv(os.path.join(raw, \"customers.csv\"),\n                                        [\"customer_id\", \"first_name\", \"last_name\", \"email\", \"phone\", \"state\", \"city\", \"signup_date\", \"signup_channel\"], customers)\n\n    # ---- orders, items, payments, deliveries (CSV history + API-only newer orders)\n    def make_order(seq, start, end):\n        oid = f\"O{seq:07d}\"\n        cid = f\"C{rng.randint(1, n_customers):05d}\"\n        ts = rand_ts(rng, start, end)\n        # Black Friday / December rush: more orders late in the year\n        if rng.random() < 0.15:\n            ts = ts.replace(month=rng.choice([11, 12]), day=rng.randint(1, 28))\n            if ts > end:\n                ts = end - timedelta(hours=rng.randint(1, 500))\n        items = []\n        for k in range(rng.choices([1, 2, 3, 4], [55, 25, 13, 7])[0]):\n            prod = rng.choice(products)[0]\n            qty = rng.choices([1, 2, 3, 5], [70, 18, 8, 4])[0]\n            unit = price_of[prod]\n            if rng.random() < 0.002:\n                qty = 0\n            if rng.random() < 0.001:\n                unit = -unit\n            items.append([f\"{oid}-{k + 1}\", oid, prod, qty, unit])\n        total = sum(max(q, 0) * max(u, 0) for _, _, _, q, u in items)\n        method = rng.choices([\"card\", \"bank_transfer\", \"ussd\", \"pay_on_delivery\"], [42, 30, 10, 18])[0]\n        status = rng.choices([\"delivered\", \"shipped\", \"paid\", \"pending\", \"cancelled\", \"returned\"], [62, 8, 6, 6, 13, 5])[0]\n        updated = ts + timedelta(hours=rng.randint(0, 240))\n        state = home[cid] if rng.random() < 0.9 else weighted_state(rng)[0]\n        order = {\"order_id\": oid, \"customer_id\": cid, \"order_ts\": iso(ts), \"status\": status, \"payment_method\": method,\n                 \"delivery_state\": messy_state(rng, state), \"total_amount_ngn\": total, \"updated_at\": iso(min(updated, end))}\n        pays = []\n        if method != \"pay_on_delivery\" or status == \"delivered\":\n            attempts = 1 if rng.random() > 0.12 else 2\n            for t in range(attempts):\n                ok = t == attempts - 1 and status not in (\"pending\", \"cancelled\")\n                pstatus = \"success\" if ok else rng.choice([\"failed\", \"abandoned\"])\n                paid_at = ts + timedelta(minutes=rng.randint(1, 90))\n                pays.append([None, oid, rng.choices([\"paystack\", \"flutterwave\"], [70, 30])[0],\n                             f\"NM-{oid[1:]}-{t + 1}\", total * 100, pstatus, iso(paid_at) if ok else \"\",\n                             \"pos\" if method == \"pay_on_delivery\" else method])\n        deliv = None\n        if status in (\"shipped\", \"delivered\", \"returned\"):\n            disp = ts + timedelta(hours=rng.randint(6, 72))\n            days = rng.randint(1, 3) if state in (\"Lagos\", \"Ogun\") else rng.randint(2, 9)\n            done = disp + timedelta(days=days, hours=rng.randint(0, 12))\n            deliv = [None, oid, rng.choice(COURIERS), iso(disp), iso(done) if status != \"shipped\" else \"\",\n                     \"in_transit\" if status == \"shipped\" else (\"returned\" if status == \"returned\" else \"delivered\")]\n        return order, items, pays, deliv\n\n    orders, items, payments, deliveries = [], [], [], []\n    for s in range(1, n_orders + 1):\n        o, it, ps, d = make_order(s, START, CUTOFF)\n        orders.append(o); items += it; payments += ps\n        if d: deliveries.append(d)\n    orders.sort(key=lambda o: o[\"order_ts\"])\n\n    order_cols = [\"order_id\", \"customer_id\", \"order_ts\", \"status\", \"payment_method\", \"delivery_state\", \"total_amount_ngn\", \"updated_at\"]\n    order_rows = []\n    for o in orders:\n        row = [o[c] for c in order_cols]\n        if rng.random() < 0.02:  # a legacy system exports DD/MM/YYYY HH:MM\n            t = datetime.strptime(o[\"order_ts\"], \"%Y-%m-%dT%H:%M:%S\")\n            row[2] = t.strftime(\"%d/%m/%Y %H:%M\")\n        order_rows.append(row)\n        if rng.random() < 0.01:\n            order_rows.append(list(row))  # exported twice\n    counts[\"orders.csv\"] = write_csv(os.path.join(raw, \"orders.csv\"), order_cols, order_rows)\n    counts[\"order_items.csv\"] = write_csv(os.path.join(raw, \"order_items.csv\"),\n                                          [\"order_item_id\", \"order_id\", \"product_id\", \"quantity\", \"unit_price_ngn\"], items)\n    for i, p in enumerate(payments, 1):\n        p[0] = f\"PAY{i:07d}\"\n    counts[\"payments.csv\"] = write_csv(os.path.join(raw, \"payments.csv\"),\n                                       [\"payment_id\", \"order_id\", \"provider\", \"reference\", \"amount_kobo\", \"status\", \"paid_at\", \"channel\"], payments)\n    for i, d in enumerate(deliveries, 1):\n        d[0] = f\"D{i:07d}\"\n    counts[\"deliveries.csv\"] = write_csv(os.path.join(raw, \"deliveries.csv\"),\n                                         [\"delivery_id\", \"order_id\", \"courier\", \"dispatched_at\", \"delivered_at\", \"delivery_status\"], deliveries)\n\n    # ---- warehouse power outages (the \"NEPA log\")\n    outages = []\n    for i in range(1, max(100, int(2000 * a.scale)) + 1):\n        wh, st = rng.choice(WAREHOUSES)\n        start = rand_ts(rng, START, CUTOFF)\n        mins = int(rng.expovariate(1 / 180)) + 5\n        outages.append([f\"OUT{i:05d}\", wh, st, iso(start), iso(start + timedelta(minutes=mins)),\n                        rng.choices([\"grid\", \"generator_fault\", \"scheduled\"], [80, 12, 8])[0]])\n    outages.sort(key=lambda r: r[3])\n    counts[\"power_outages.csv\"] = write_csv(os.path.join(raw, \"power_outages.csv\"),\n                                            [\"outage_id\", \"warehouse_id\", \"state\", \"outage_start\", \"outage_end\", \"cause\"], outages)\n\n    # ---- clickstream (JSON Lines) for the Spark and Kafka modules\n    with open(os.path.join(raw, \"clickstream.jsonl\"), \"w\", encoding=\"utf-8\") as f:\n        e = 0\n        while e < n_events:\n            sess = f\"S{rng.randint(1, 10**9):09d}\"\n            cid = f\"C{rng.randint(1, n_customers):05d}\" if rng.random() < 0.6 else None\n            t = rand_ts(rng, START, CUTOFF)\n            device = rng.choices([\"android\", \"ios\", \"desktop\", \"feature_phone\"], [55, 15, 25, 5])[0]\n            funnel = [\"page_view\"] * rng.randint(1, 6)\n            if rng.random() < 0.3: funnel.append(\"add_to_cart\")\n            if \"add_to_cart\" in funnel and rng.random() < 0.4: funnel.append(\"checkout_start\")\n            if \"checkout_start\" in funnel and rng.random() < 0.6: funnel.append(\"purchase\")\n            prod = rng.choice(products)[0]\n            for ev in funnel:\n                e += 1\n                t += timedelta(seconds=rng.randint(3, 240))\n                f.write(json.dumps({\"event_id\": f\"E{e:09d}\", \"session_id\": sess, \"customer_id\": cid, \"event_type\": ev,\n                                    \"product_id\": prod if ev != \"page_view\" or rng.random() < 0.7 else None,\n                                    \"event_ts\": iso(t), \"device\": device, \"state\": weighted_state(rng)[0]}) + \"\\n\")\n    counts[\"clickstream.jsonl\"] = e\n\n    # ---- newer orders, only reachable through the mock API (scripts/naijamart_api.py)\n    api_orders = []\n    for s in range(n_orders + 1, n_orders + n_api_orders + 1):\n        o, it, _, _ = make_order(s, CUTOFF + timedelta(seconds=1), API_END)\n        o[\"items\"] = [{\"product_id\": p, \"quantity\": q, \"unit_price_ngn\": u} for _, _, p, q, u in it]\n        api_orders.append(o)\n    api_orders.sort(key=lambda o: o[\"updated_at\"])\n    with open(os.path.join(api, \"orders.json\"), \"w\", encoding=\"utf-8\") as f:\n        json.dump(api_orders, f)\n    with open(os.path.join(api, \"products.json\"), \"w\", encoding=\"utf-8\") as f:\n        json.dump([dict(zip([\"product_id\", \"product_name\", \"category\", \"brand\", \"unit_price_ngn\", \"is_active\"], p)) for p in products], f)\n    counts[\"api/orders.json\"] = len(api_orders)\n\n    print(f\"NaijaMart data written to {os.path.abspath(a.out)} (seed {a.seed}, scale {a.scale})\")\n    for name, n in counts.items():\n        print(f\"  {name:<22} {n:>9,} rows\")\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nCheck the file arrived whole. It should be 282 lines:\n\n```bash\nwc -l scripts/generate_naijamart_data.py\n```\n\n**Expected output:**\n```text\n     282 scripts/generate_naijamart_data.py\n```\n\nIf you get fewer lines, the paste was cut short. Open the file again and paste the whole block.\n\n3. **Run it.** It writes about 74 MB into `data/` and takes a few seconds (about 6 seconds on a recent laptop; slower machines may take 30).\n\n```bash\npython3 scripts/generate_naijamart_data.py\n```\n\n**Expected output** (your folder path will differ; the numbers will not):\n```text\nNaijaMart data written to /Users/yourname/naijamart-data-platform/data (seed 42, scale 1.0)\n  products.csv                 102 rows\n  customers.csv              5,000 rows\n  orders.csv                50,524 rows\n  order_items.csv           85,850 rows\n  payments.csv              52,197 rows\n  deliveries.csv            37,509 rows\n  power_outages.csv          2,000 rows\n  clickstream.jsonl        300,000 rows\n  api/orders.json            4,000 rows\n```\n\n> **8 GB RAM / weak laptop:** run `python3 scripts/generate_naijamart_data.py --scale 0.2` instead. It writes about 15 MB (1,000 customers, 10,104 orders, 60,005 clickstream events). Every lab says which scale it assumes, and your numbers will only match a lab's at the same scale.\n\n4. **Look at what you made.** `ls -lh` lists files with human-readable sizes.\n\n```bash\nls -lh data/raw\n```\n\n**Expected output** (dates and owner columns trimmed; sizes may differ slightly by system):\n```text\n 58M  clickstream.jsonl\n467K  customers.csv\n2.9M  deliveries.csv\n2.9M  order_items.csv\n4.3M  orders.csv\n4.2M  payments.csv\n140K  power_outages.csv\n6.5K  products.csv\n```\n\n5. **Read the first rows of the orders file.** `head -3` prints the header plus two rows.\n\n```bash\nhead -3 data/raw/orders.csv\n```\n\n**Expected output:**\n```text\norder_id,customer_id,order_ts,status,payment_method,delivery_state,total_amount_ngn,updated_at\nO0017400,C03672,2025-01-01T00:05:41,delivered,bank_transfer,Oyo,12550,2025-01-01T10:05:41\nO0038809,C02333,2025-01-01T00:12:01,shipped,card,Lagos State,260750,2025-01-02T21:12:01\n```\n\nNotice that the second order's state is already `Lagos State`, not `Lagos`. That is planted problem number one.\n\n6. **Find the duplicate orders.** This short Python snippet counts every row, then counts distinct rows. If the numbers differ, some rows appear more than once.\n\n```bash\npython3 -c \"\nimport csv\nrows = list(csv.reader(open('data/raw/orders.csv')))[1:]\nprint('rows:', len(rows))\nprint('distinct rows:', len(set(map(tuple, rows))))\n\"\n```\n\n**Expected output:**\n```text\nrows: 50524\ndistinct rows: 50000\n```\n\nSo 524 rows are duplicates. A report that summed every row would count those 524 orders twice.\n\n7. **Find the legacy dates.** ISO timestamps contain no `/`, while the legacy `DD/MM/YYYY HH:MM` format does.\n\n```bash\npython3 -c \"\nimport csv\nrows = list(csv.DictReader(open('data/raw/orders.csv')))\nlegacy = [r['order_ts'] for r in rows if '/' in r['order_ts']]\nprint(len(legacy), 'legacy timestamps, e.g.', legacy[0])\n\"\n```\n\n**Expected output:**\n```text\n996 legacy timestamps, e.g. 04/01/2025 18:00\n```\n\nIs `04/01/2025` the 4th of January or the 1st of April? In Nigeria and the UK it means 4 January; a tool configured for the USA reads 1 April. Module 3 parses these safely.\n\n8. **Count the spellings of Lagos and FCT.**\n\n```bash\npython3 -c \"\nimport csv, collections\nc = collections.Counter(r['delivery_state'] for r in csv.DictReader(open('data/raw/orders.csv')))\nfor s in ['Lagos', 'Lagos State', 'lagos', 'LAGOS ', 'FCT', 'fct', 'FCT Abuja', 'Abuja']:\n    print(repr(s), c[s])\n\"\n```\n\n**Expected output:**\n```text\n'Lagos' 13465\n'Lagos State' 612\n'lagos' 596\n'LAGOS ' 562\n'FCT' 5352\n'fct' 255\n'FCT Abuja' 245\n'Abuja' 230\n```\n\nA dashboard grouping by `delivery_state` as-is would show Lagos as four separate states. `repr()` prints the quotes so you can see the trailing space in `'LAGOS '`.\n\n### Common errors\n| Error you see | Why | Fix (Windows / Mac) |\n|---|---|---|\n| `python3: command not found` | No Python installed, or you are in PowerShell rather than Ubuntu | Windows: open the Ubuntu app (Lesson 3) and run it there. Mac: run `xcode-select --install`, or wait for Lesson 4 |\n| `python3: can't open file '.../scripts/generate_naijamart_data.py': [Errno 2] No such file or directory` | You are not in the project folder, or the file name is misspelt | Run `cd ~/naijamart-data-platform` then `ls scripts` and check the exact name |\n| `SyntaxError: invalid syntax` or `IndentationError: unexpected indent` | The paste was incomplete or an editor changed the indentation | Delete the file, paste the whole block again into nano or VS Code (not a word processor), and check `wc -l` says 282 |\n| `zsh: command not found: python` | macOS ships `python3`, not `python` | Type `python3`. Lesson 4 sets up a virtual environment where `python` works |\n| `OSError: [Errno 28] No space left on device` | Under about 100 MB free on the disk | Free space, or run with `--scale 0.2` (about 15 MB) |\n\n## Challenge\nGenerate a second, tiny dataset in a separate folder with a different seed, without touching `data/`. Then prove, using only the terminal, that a different seed gives different data but the same columns. Finally, explain why the course insists everyone uses seed 42.\n\n<details>\n<summary>Show one solution</summary>\n\n```bash\npython3 scripts/generate_naijamart_data.py --scale 0.2 --seed 7 --out /tmp/naijamart-seed7\nhead -1 data/raw/orders.csv\nhead -1 /tmp/naijamart-seed7/raw/orders.csv\nhead -2 data/raw/orders.csv | tail -1\nhead -2 /tmp/naijamart-seed7/raw/orders.csv | tail -1\n```\n\nThe two header lines are identical; the first data rows differ. `--out` changes the destination folder, so your real `data/` is untouched. Everyone uses seed 42 so that a lab can print \"50,524 rows\" and you know immediately whether your result is right. With random data, a wrong query and a right one look the same. Delete the experiment afterwards with `rm -rf /tmp/naijamart-seed7`.\n\n</details>\n\n## Check yourself\n1. NaijaMart's finance lead sums `total_amount_ngn` straight from `orders.csv` for all of 2025 and reports it to the board. Name two planted problems that make the figure wrong, and say which direction each one pushes it.\n2. A payment row shows `amount_kobo` of 1255000. What is that in naira, written the way this course writes currency?\n3. Your friend has 4 GB of RAM and a nearly full disk. Which command should they run, and why will their lab numbers differ from yours?\n\n<details>\n<summary>Check your thinking</summary>\n\n1. The 524 duplicate rows push the total up. Cancelled and returned orders, if finance means \"money collected\", also push it up, because their totals are still in the file. Pay-on-delivery orders that never delivered are a third. Any two, with the direction, is a good answer.\n2. ₦12,550 (1,255,000 divided by 100).\n3. `python3 scripts/generate_naijamart_data.py --scale 0.2`. It produces fewer rows (for example 10,104 orders instead of 50,524), so every count and sum is different; they must compare against the scale 0.2 outputs.\n\n</details>\n\n## Project checkpoint\nYou now have `scripts/generate_naijamart_data.py` and a `data/` folder. Git and GitHub arrive in Lesson 5, which also adds the `.gitignore` that keeps `data/` out of the repo. Do **not** commit yet. When Lesson 5 has set up the repository, the first commit of this file looks like this:\n\n```bash\ncd ~/naijamart-data-platform\ngit add scripts/generate_naijamart_data.py\ngit commit -m \"Add the seeded NaijaMart data generator\"\ngit push\n```","videoUrl":"https://www.youtube.com/watch?v=JUws0cMnL78","isFree":true,"locked":false},{"id":"lesson_1793914434397_fbey37k","_id":"6aecf642296f6ef4c893d972","title":"Lesson 2: The Modern Data Stack, End to End","type":"video","duration":20,"content":"","locked":true},{"id":"lesson_1793914434397_grqoomg","_id":"6aecf642296f6ef4c893d973","title":"Lesson 3: The Terminal: WSL2 on Windows and macOS","type":"video","duration":24,"content":"","locked":true},{"id":"lesson_1793914434397_sagvotf","_id":"6aecf642296f6ef4c893d974","title":"Lesson 4: Installing Python and VS Code","type":"video","duration":20,"content":"","locked":true},{"id":"lesson_1793914434397_npfrpni","_id":"6aecf642296f6ef4c893d975","title":"Lesson 5: Git and GitHub: Creating the NaijaMart Repo","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434397_3kkdtn0","_id":"6aecf642296f6ef4c893d976","title":"Lesson 6: Docker Desktop on an 8 GB Laptop","type":"video","duration":24,"content":"","locked":true},{"id":"lesson_1793914434398_oyx26ah","_id":"6aecf642296f6ef4c893d977","title":"Lesson 7: The Offline-Friendly Setup Checklist","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434398_h0aq6bw","_id":"6aecf642296f6ef4c893d978","title":"Lesson 8: Mini-Project: The NaijaMart Repo and a Working Environment","type":"video","duration":14,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d968","title":"Module 1: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434398_tg37zc8","_id":"6aecf642296f6ef4c893d9cf","title":"Module 2: SQL for Data Engineers","lessons":[{"id":"lesson_1793914434398_t35jqhc","_id":"6aecf642296f6ef4c893d9d0","title":"Lesson 1: Relational Databases and Loading CSVs into PostgreSQL","type":"video","duration":24,"content":"","locked":true},{"id":"lesson_1793914434398_qyy66tg","_id":"6aecf642296f6ef4c893d9d1","title":"Lesson 2: SELECT, Filtering, Sorting and Aggregation","type":"video","duration":19,"content":"","locked":true},{"id":"lesson_1793914434398_tb9wuo7","_id":"6aecf642296f6ef4c893d9d2","title":"Lesson 3: Joins, Including the Anti-Join","type":"video","duration":19,"content":"","locked":true},{"id":"lesson_1793914434399_5woh4uk","_id":"6aecf642296f6ef4c893d9d3","title":"Lesson 4: Subqueries and CTEs","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434399_38yyd5d","_id":"6aecf642296f6ef4c893d9d4","title":"Lesson 5: Window Functions for Deduplication, Running Totals and LAG","type":"video","duration":23,"content":"","locked":true},{"id":"lesson_1793914434399_dsnng9l","_id":"6aecf642296f6ef4c893d9d5","title":"Lesson 6: DDL, Constraints and Upserts","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_amgt40n","_id":"6aecf642296f6ef4c893d9d6","title":"Lesson 7: Indexes and Reading Query Plans","type":"video","duration":27,"content":"","locked":true},{"id":"lesson_1793914434399_s7ys8qh","_id":"6aecf642296f6ef4c893d9d7","title":"Lesson 8: DuckDB for Local Analytics","type":"video","duration":23,"content":"","locked":true},{"id":"lesson_1793914434399_au4m0t1","_id":"6aecf642296f6ef4c893d9d8","title":"Lesson 9: Mini-Project: The NaijaMart Sales Analytics SQL Pack","type":"video","duration":14,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d969","title":"Module 2: Quiz","passingScore":14,"questionCount":20,"questions":[],"locked":true}},{"id":"module_1793914434399_42rs25w","_id":"6aecf642296f6ef4c893da39","title":"Module 3: Python for Data Engineering","lessons":[{"id":"lesson_1793914434399_is7plv7","_id":"6aecf642296f6ef4c893da3a","title":"Lesson 1: Python Essentials for Data Engineers","type":"video","duration":20,"content":"","locked":true},{"id":"lesson_1793914434399_ly0bs6o","_id":"6aecf642296f6ef4c893da3b","title":"Lesson 2: Virtual Environments and Pinned Requirements","type":"video","duration":18,"content":"","locked":true},{"id":"lesson_1793914434399_q2p790b","_id":"6aecf642296f6ef4c893da3c","title":"Lesson 3: Working with Files: CSV and JSON","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434399_0j4n6wb","_id":"6aecf642296f6ef4c893da3d","title":"Lesson 4: Pulling Data from APIs with requests","type":"video","duration":27,"content":"","locked":true},{"id":"lesson_1793914434399_dqjs2ga","_id":"6aecf642296f6ef4c893da3e","title":"Lesson 5: Cleaning Data with pandas","type":"video","duration":23,"content":"","locked":true},{"id":"lesson_1793914434399_4d95ym3","_id":"6aecf642296f6ef4c893da3f","title":"Lesson 6: Polars: Fast DataFrames on a Small Laptop","type":"video","duration":25,"content":"","locked":true},{"id":"lesson_1793914434399_hdcjoz2","_id":"6aecf642296f6ef4c893da40","title":"Lesson 7: Error Handling, Retries and Logging","type":"video","duration":26,"content":"","locked":true},{"id":"lesson_1793914434399_jdgxwbs","_id":"6aecf642296f6ef4c893da41","title":"Lesson 8: Loading into PostgreSQL and Writing Parquet","type":"video","duration":35,"content":"","locked":true},{"id":"lesson_1793914434399_pgz20t0","_id":"6aecf642296f6ef4c893da42","title":"Lesson 9: Mini-Project: A Reusable Extract-Load Script","type":"video","duration":23,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96a","title":"Module 3: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434399_aio1egm","_id":"6aecf642296f6ef4c893da99","title":"Module 4: Data Modelling and Warehousing","lessons":[{"id":"lesson_1793914434399_v6vfd13","_id":"6aecf642296f6ef4c893da9a","title":"Lesson 1: OLTP vs OLAP","type":"video","duration":23,"content":"","locked":true},{"id":"lesson_1793914434399_pgp3ses","_id":"6aecf642296f6ef4c893da9b","title":"Lesson 2: Normalisation from 1NF to 3NF","type":"video","duration":24,"content":"","locked":true},{"id":"lesson_1793914434399_54fqnnj","_id":"6aecf642296f6ef4c893da9c","title":"Lesson 3: Dimensional Modelling: Facts, Dimensions and Grain","type":"video","duration":30,"content":"","locked":true},{"id":"lesson_1793914434399_lzslzyu","_id":"6aecf642296f6ef4c893da9d","title":"Lesson 4: Star vs Snowflake Schemas","type":"video","duration":22,"content":"","locked":true},{"id":"lesson_1793914434399_t7puf3m","_id":"6aecf642296f6ef4c893da9e","title":"Lesson 5: Slowly Changing Dimensions: Type 1 and Type 2","type":"video","duration":31,"content":"","locked":true},{"id":"lesson_1793914434399_5jo7cvt","_id":"6aecf642296f6ef4c893da9f","title":"Lesson 6: Designing the NaijaMart Warehouse in dbdiagram.io","type":"video","duration":26,"content":"","locked":true},{"id":"lesson_1793914434399_6ew5uvh","_id":"6aecf642296f6ef4c893daa0","title":"Lesson 7: Mini-Project: The NaijaMart Warehouse Design","type":"video","duration":15,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96b","title":"Module 4: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434399_2plnoqh","_id":"6aecf642296f6ef4c893daf7","title":"Module 5: ETL, ELT and Transformation with dbt","lessons":[{"id":"lesson_1793914434399_y89w0f2","_id":"6aecf642296f6ef4c893daf8","title":"Lesson 1: ETL vs ELT, and Where dbt Fits","type":"video","duration":18,"content":"","locked":true},{"id":"lesson_1793914434399_bijb2tm","_id":"6aecf642296f6ef4c893daf9","title":"Lesson 2: Setting Up dbt Core with DuckDB","type":"video","duration":18,"content":"","locked":true},{"id":"lesson_1793914434399_8czqoub","_id":"6aecf642296f6ef4c893dafa","title":"Lesson 3: Sources and Staging Models","type":"video","duration":25,"content":"","locked":true},{"id":"lesson_1793914434399_bbtysa4","_id":"6aecf642296f6ef4c893dafb","title":"Lesson 4: ref() and Building the Marts","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_msfdede","_id":"6aecf642296f6ef4c893dafc","title":"Lesson 5: Testing with dbt: Generic, Singular and dbt_utils","type":"video","duration":27,"content":"","locked":true},{"id":"lesson_1793914434399_5tbxk2h","_id":"6aecf642296f6ef4c893dafd","title":"Lesson 6: Documentation and Lineage","type":"video","duration":17,"content":"","locked":true},{"id":"lesson_1793914434399_u75p7bu","_id":"6aecf642296f6ef4c893dafe","title":"Lesson 7: Incremental Models and Snapshots","type":"video","duration":31,"content":"","locked":true},{"id":"lesson_1793914434399_sz6eojq","_id":"6aecf642296f6ef4c893daff","title":"Lesson 8: Mini-Project: The NaijaMart dbt Project","type":"video","duration":14,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96c","title":"Module 5: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434399_uz04sat","_id":"6aecf642296f6ef4c893db56","title":"Module 6: Orchestration","lessons":[{"id":"lesson_1793914434399_co1n9ro","_id":"6aecf642296f6ef4c893db57","title":"Lesson 1: Why Orchestrate? Cron vs an Orchestrator","type":"video","duration":22,"content":"","locked":true},{"id":"lesson_1793914434399_1egcnux","_id":"6aecf642296f6ef4c893db58","title":"Lesson 2: Running Airflow 3 in Docker on 8 GB","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_iy17pqb","_id":"6aecf642296f6ef4c893db59","title":"Lesson 3: Your First DAG with the TaskFlow API","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434399_6spqnme","_id":"6aecf642296f6ef4c893db5a","title":"Lesson 4: Scheduling, Retries, Catchup and Backfills","type":"video","duration":31,"content":"","locked":true},{"id":"lesson_1793914434399_u98fuac","_id":"6aecf642296f6ef4c893db5b","title":"Lesson 5: Sensors, Connections and Variables","type":"video","duration":27,"content":"","locked":true},{"id":"lesson_1793914434399_9x1h0ua","_id":"6aecf642296f6ef4c893db5c","title":"Lesson 6: Running dbt from Airflow","type":"video","duration":24,"content":"","locked":true},{"id":"lesson_1793914434399_460v7c7","_id":"6aecf642296f6ef4c893db5d","title":"Lesson 7: The Alternatives: Prefect and Dagster","type":"video","duration":30,"content":"","locked":true},{"id":"lesson_1793914434399_i2jqwab","_id":"6aecf642296f6ef4c893db5e","title":"Lesson 8: Mini-Project: NaijaMart's Daily DAG","type":"video","duration":14,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96d","title":"Module 6: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434399_qdsrz8r","_id":"6aecf642296f6ef4c893dbb5","title":"Module 7: Big Data and Streaming","lessons":[{"id":"lesson_1793914434399_ilpdocg","_id":"6aecf642296f6ef4c893dbb6","title":"Lesson 1: Batch vs Streaming, and When Data Is Big","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434399_uobkzxk","_id":"6aecf642296f6ef4c893dbb7","title":"Lesson 2: Parquet, Partitioning and Data Lakes","type":"video","duration":26,"content":"","locked":true},{"id":"lesson_1793914434399_w207zp9","_id":"6aecf642296f6ef4c893dbb8","title":"Lesson 3: PySpark on Your Laptop","type":"video","duration":26,"content":"","locked":true},{"id":"lesson_1793914434399_axp8z3s","_id":"6aecf642296f6ef4c893dbb9","title":"Lesson 4: Databricks Free Edition","type":"video","duration":21,"content":"","locked":true},{"id":"lesson_1793914434399_uaecymi","_id":"6aecf642296f6ef4c893dbba","title":"Lesson 5: Kafka Basics with Docker","type":"video","duration":31,"content":"","locked":true},{"id":"lesson_1793914434399_679fagz","_id":"6aecf642296f6ef4c893dbbb","title":"Lesson 6: Lakehouses: Delta Lake and Iceberg","type":"video","duration":30,"content":"","locked":true},{"id":"lesson_1793914434399_rznrt6m","_id":"6aecf642296f6ef4c893dbbc","title":"Lesson 7: Mini-Project: Clickstream Batch Job and Order Event Stream","type":"video","duration":13,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96e","title":"Module 7: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}},{"id":"module_1793914434399_2z1b3ma","_id":"6aecf642296f6ef4c893dc13","title":"Module 8: Cloud, Quality and Career","lessons":[{"id":"lesson_1793914434399_t49tigr","_id":"6aecf642296f6ef4c893dc14","title":"Lesson 1: BigQuery in the Free Sandbox","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_vdl8yhp","_id":"6aecf642296f6ef4c893dc15","title":"Lesson 2: Data Quality with Great Expectations","type":"video","duration":30,"content":"","locked":true},{"id":"lesson_1793914434399_nj1o3f4","_id":"6aecf642296f6ef4c893dc16","title":"Lesson 3: CI for Data Pipelines with GitHub Actions","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_ud2uisg","_id":"6aecf642296f6ef4c893dc17","title":"Lesson 4: Monitoring, Alerting and Cost Control","type":"video","duration":35,"content":"","locked":true},{"id":"lesson_1793914434399_q0g2sbz","_id":"6aecf642296f6ef4c893dc18","title":"Lesson 5: Capstone: The End-to-End NaijaMart Pipeline","type":"video","duration":20,"content":"","locked":true},{"id":"lesson_1793914434399_5otd1gl","_id":"6aecf642296f6ef4c893dc19","title":"Lesson 6: Your Portfolio README and Interview Script","type":"video","duration":22,"content":"","locked":true},{"id":"lesson_1793914434399_utcsu31","_id":"6aecf642296f6ef4c893dc1a","title":"Lesson 7: CV, Interviews and Finding Data Engineering Jobs","type":"video","duration":29,"content":"","locked":true},{"id":"lesson_1793914434399_157ettf","_id":"6aecf642296f6ef4c893dc1b","title":"Lesson 8: Resources: Every Tool, Dataset and Practice Platform","type":"video","duration":15,"content":"","locked":true}],"quiz":{"id":"6aecf642296f6ef4c893d96f","title":"Module 8: Quiz","passingScore":13,"questionCount":18,"questions":[],"locked":true}}],"price_ngn":80000,"price_usd":0,"publishedAt":"2026-11-05T21:33:54.400Z","rating":0,"ratingCount":0,"status":"published","tags":["data-engineering","sql","python","dbt","apache-airflow","apache-spark","kafka","bigquery","data-warehousing","etl","portfolio-project"],"title":"Data Engineering Masterclass: From Zero to Production Pipelines","updatedAt":"2026-11-05T21:33:54.400Z","coverImage":"https://res.cloudinary.com/deyjioiwi/image/upload/v1793950891/course-covers/general/ebj0il0z5t7jfbwfvzpf.png","locked":true,"previewLessonId":"lesson_1793914434397_zxqocgr"}