DataCorp's processes are defined and coordinated: the nightly load finishes around 01:55 and the micro-batches meet their deadlines. The remaining question is whether all of this is, and will continue to be, fast enough. Two requirements make it concrete: RQ-05 requires dashboards to respond in under 5 seconds at the 95th percentile, with 10 concurrent users, and RQ-04 requires yesterday's data to be published before 07:00.

Optimizing performance is not about applying tricks, but about a method: measure, locate the bottleneck, change one thing and measure again. This lesson presents that method and the techniques that pay off most on an analytical platform, ordered by where they act: the query, the storage, pre-aggregation, the pipeline and the compute. We will illustrate it by measuring the UC-01 query before and after using the daily_net_sales aggregate table.

Two neighboring topics are left out: how the platform grows when the data or the users grow (scalability, lesson 07-03) and how much it costs (lesson 07-04).

The method: measure before optimizing

Optimization without measurement is superstition: you change what looks slow, not what is slow. The method has five steps:

  1. Set the target. A number and how it is measured. "Make it faster" is not a target; "p95 below 5 s" is.
  2. Establish the baseline. Measure the current situation, several times and under realistic conditions.
  3. Locate the bottleneck. The step that takes the most time. Improving any other one is barely noticeable.
  4. Change a single thing and measure again. If you change three, you do not know which one helped.
  5. Stop when the target is met. Every optimization adds complexity; beyond the target, it stops paying off.

Two clarifications about measuring:

  • Percentiles, not averages. Lesson 01-04 explained that the p95 is the time that 95% of the queries do not exceed. An average of 2 seconds can hide the fact that one in ten queries takes 20.
  • Cold and warm. The first run of a query is usually slower, because the data is not yet in memory. You need to know which of the two you are measuring.

The baseline for the nightly load is provided by the orchestrator. These are the average durations of nightly_load_sales:

Task Duration % of total
extract_* (4 in parallel) 9 min 22%
validate_ingestion 1 min 3%
transform_cleansed 14 min 35%
tests_cleansed 3 min 8%
publish_consumption 11 min 27%
refresh_daily_net_sales 2 min 5%
Total 40 min

The table says two things. First: at 40 minutes out of a window of almost five hours, the nightly load does not need optimizing today; the effort should go where a target is at risk. Second: if it were ever needed, you would start with transform_cleansed, not with the tests.

Reading an execution plan

SQL is a declarative language: you say what you want, and the engine decides how to get it. That decision is the execution plan, and seeing it is the most useful diagnostic tool there is.

  • EXPLAIN shows the plan the engine intends to use, with its estimates, without running the query.
  • EXPLAIN ANALYZE runs it and adds what really happened: actual times and rows.

Let's look at a case on the PostgreSQL replica, with a check query that counts the orders for one day (the values are illustrative, for a table of 2.7 million rows):

EXPLAIN ANALYZE
SELECT COUNT(*), SUM(total_amount)
FROM orders
WHERE CAST(order_date AS DATE) = DATE '2026-11-17';
Aggregate  (cost=62840.00..62840.01 rows=1 width=40)
           (actual time=412.310..412.311 rows=1 loops=1)
  ->  Seq Scan on orders  (cost=0.00..62772.50 rows=13500 width=6)
                          (actual time=398.120..412.050 rows=1512 loops=1)
        Filter: ((order_date)::date = '2026-11-17'::date)
        Rows Removed by Filter: 2698488
Planning Time: 0.110 ms
Execution Time: 412.350 ms

A plan is a tree that is read from the inside out: the most indented nodes run first and hand their rows to the node above.

Element Meaning In the example
Node An operation Seq Scan (sequential scan of the whole table) and Aggregate
cost=a..b Estimated cost, in internal units: up to the first row and total 62,772 for the scan
rows= (first parenthesis) Rows the engine estimated 13,500
actual time= Actual time, in milliseconds 412 ms
rows= (second parenthesis) Actual rows 1,512
Rows Removed by Filter Rows read and discarded 2,698,488

The diagnosis is in the last two rows of the table: to return 1,512 orders, the engine has read 2.7 million. There is an index on the column (idx_orders_date, lesson 02-04), but it is not used, because the filter does not compare the column, but the result of a function applied to it. The index sorts values of order_date, not of CAST(order_date AS DATE).

Rewritten as a range on the untransformed column:

EXPLAIN ANALYZE
SELECT COUNT(*), SUM(total_amount)
FROM orders
WHERE order_date >= TIMESTAMP '2026-11-17 00:00:00'
  AND order_date <  TIMESTAMP '2026-11-18 00:00:00';
Aggregate  (cost=58.90..58.91 rows=1 width=40)
           (actual time=0.612..0.613 rows=1 loops=1)
  ->  Index Scan using idx_orders_date on orders
           (cost=0.43..51.40 rows=1500 width=6)
           (actual time=0.031..0.420 rows=1512 loops=1)
        Index Cond: ((order_date >= '2026-11-17 00:00:00')
                 AND (order_date < '2026-11-18 00:00:00'))
Execution Time: 0.650 ms

Seq Scan has become Index Scan, there are no longer any discarded rows and the time drops from 412 ms to under 1 ms. There are three signs always worth looking for in a plan:

  1. Full scans of large tables when few rows are requested.
  2. Many rows read and discarded by a filter.
  3. Estimates that are far from reality (here, 13,500 versus 1,512): they point to stale statistics or conditions the engine does not know how to evaluate, and they lead to bad plans.

Each engine presents its plans in its own way, but the concepts (what is scanned, how much is discarded, how the tables are joined, estimated versus actual) are common to all of them.

Query optimization

On a columnar analytical engine over files, almost all query optimization comes down to one idea: read less data.

Technique What it consists of Example
Select only the columns needed In columnar storage, every column not requested is a column that is not read Avoid SELECT *; request date_sk, net_amount
Filter early Reduce rows before joining or aggregating Filter the month in fact_sales before joining with the dimensions
Partition pruning Filter by the partition column so as not to open files WHERE "month" = '2026-11' opens one folder out of 36
Predicate pushdown The engine moves the filter down to the file reader, which skips the blocks whose minimum and maximum cannot satisfy it A filter by date_sk skips the blocks for other days
Do not apply functions to the filter column A function on the column prevents the use of indexes, pruning and statistics sales_date >= '2026-11-01' instead of YEAR(sales_date) = 2026
Well-designed joins Join on keys of the same type; reduce before joining The integer surrogate keys of the star schema
Approximate aggregations Accept a small error in exchange for a lot of speed Approximate count of distinct customers in the clickstream

Joins and their order. Engines implement joins mainly with two algorithms. In a hash join, the smaller table is loaded into memory as a dictionary and the larger one is scanned, looking each row up in it: that is why it helps for one of the two to be small, and the star schema guarantees it (small dimensions, large facts). In a sort-merge join, both are sorted by the key and scanned in parallel; it works for two large tables, but sorting is expensive. The optimizer chooses the order and the algorithm according to its statistics; if they are wrong, it may load the wrong table into memory.

Data skew. A join or a grouping distributes the work by key value. If one value accounts for a large share of the rows, one portion of the work becomes enormous while the others finish right away. At DataCorp there is an obvious candidate: the "Unknown" member (customer_sk = 0) and, in the clickstream, the events with no customer_id from people who browse without logging in, who are the majority. Remedies: handle that value separately (filter it out before the join and add it back afterwards), or group by a more evenly distributed key.

Storage optimization

The way the data is stored determines how much work a query can save itself. The basic decisions were made in ADR-004; what matters here is their effect on performance.

Technique What it brings Risk
Partitioning Discarding whole folders without opening them Over-partitioning: thousands of tiny files (lesson 02-06)
Clustering or sorting Within each partition, the rows are stored sorted by a frequently filtered column; the minimums and maximums of each block become selective You can only sort well by one or two columns
Appropriate file size A few medium-sized files are read much faster than thousands of small ones Huge files make parallelism harder
Compaction Periodically merging small files into larger ones It is one more process to schedule
Up-to-date statistics Accurate execution plans They get forgotten after a bulk load

Applied to DataCorp:

  • fact_sales is partitioned by month and, within each month, written sorted by date_sk. A query for a single day opens one folder and, inside it, only the blocks for that day.
  • Clickstream. The micro-batches write a file every 15 minutes: 96 a day per partition. A nightly task, compact_clickstream, merges those of each closed day into files of a few hundred megabytes. Without it, a month of events would be almost 3,000 files.
  • Target size: between 128 MB and 1 GB per Parquet file, as a general guideline.

Indexes in the transactional system. On a columnar engine the role of indexes is played by partitions, sorting and per-block statistics. In PostgreSQL, on the other hand, the index is the main tool, as the plan above has shown. It matters to the platform because of extraction: incremental queries must filter by an indexed column. When orders.updated_at exists (ADR-007), it will have to be created with its index; otherwise, every extraction will scan the whole table. Remember that each index speeds up reads and makes writes more expensive: you add the ones that are needed, not all the possible ones.

Pre-aggregation, materialized views and caches

The most effective way of speeding up a calculation is not to do it at query time. If a hundred people ask every morning for net sales by category and city, it makes no sense to go through millions of order lines a hundred times.

Technique What it is Who maintains it Freshness
Aggregate table A table with the result already calculated at a coarser grain The pipeline (a dbt model) That of the last load
Materialized view A view whose result the engine physically stores and updates The engine, automatically or on a schedule Depends on its refresh policy
Result cache The engine remembers the result of a recent identical query The engine, transparently Until the source data changes
Reporting tool extract A copy of the data in the tool's memory The analysis tool That of the last refresh

consumption.daily_net_sales is an aggregate table: it goes from the "order line" grain to the "day × category × city" grain. Besides speeding things up, it fulfills the function that justified it in lesson 02-05: it is the only place where the definition of net sales is written (RQ-11).

Three precautions with aggregates:

  1. They only serve the questions their grain allows. daily_net_sales cannot answer by product or by customer; for that, fact_sales is still there.
  2. Not all measures can be aggregated again. net_sales and units add up without any problem. num_orders does not: an order with a vacuum cleaner (Home) and headphones (Electronics) counts once in each category, and adding up categories would count it twice.
  3. They must reconcile with the detail. A stale aggregate is a second version of the truth. Hence it is rebuilt in the same load as fact_sales and is covered by tests.

The result cache is valuable for dashboards, where many people launch exactly the same query, and it fits well with a daily load: after the early-morning publication, the first query of each kind calculates and the rest reuse the result until the following night.

Before and after: the UC-01 query

Let's measure the effect of the aggregate table with a reproducible experiment in DuckDB. The program generates synthetic data at DataCorp's scale (three years of sales, about 3,750 lines a day), builds the aggregate table and times the two ways of answering UC-01 for November 2026.

import statistics
import time

import duckdb

con = duckdb.connect()                      # in-memory database
DAYS, LINES_PER_DAY = 1096, 3750            # 2024-2026; 4.11 million lines

con.sql("""CREATE TABLE dim_date AS
    SELECT CAST(strftime(d, '%Y%m%d') AS INTEGER) AS date_sk, CAST(d AS DATE) AS full_date
    FROM generate_series(TIMESTAMP '2024-01-01', TIMESTAMP '2026-12-31', INTERVAL 1 DAY) t(d)""")
con.sql("""CREATE TABLE dim_product AS
    SELECT i AS product_sk, 'Category ' || (i % 12) AS category FROM range(1, 15001) t(i)""")
con.sql("""CREATE TABLE dim_customer AS
    SELECT i AS customer_sk, 'City ' || (i % 50) AS city FROM range(1, 200001) t(i)""")

# Synthetic fact table: each row is an order line
con.sql(f"""CREATE TABLE fact_sales AS
    SELECT i AS line_id,
           i // 3 AS order_id,
           CAST(strftime(DATE '2024-01-01' + CAST(i // {LINES_PER_DAY} AS INTEGER), '%Y%m%d')
                AS INTEGER)                              AS date_sk,
           1 + CAST(floor(random() * 200000) AS INTEGER) AS customer_sk,
           1 + CAST(floor(random() * 15000) AS INTEGER)  AS product_sk,
           CASE WHEN random() < 0.08 THEN 'returned' ELSE 'delivered' END AS order_status,
           1 + CAST(floor(random() * 3) AS INTEGER)      AS quantity,
           ROUND(random() * 200, 4)                      AS net_amount
    FROM range({DAYS * LINES_PER_DAY}) t(i)""")

# The UC-01 query on the star schema, with a placeholder for the date filter
UC01_QUERY = """
    SELECT d.full_date AS sales_date, p.category, c.city,
           ROUND(SUM(s.net_amount), 2) AS net_sales
    FROM fact_sales s
    JOIN dim_date     d ON d.date_sk     = s.date_sk
    JOIN dim_customer c ON c.customer_sk = s.customer_sk
    JOIN dim_product  p ON p.product_sk  = s.product_sk
    WHERE s.order_status NOT IN ('cancelled', 'returned')
      {date_filter}
    GROUP BY d.full_date, p.category, c.city"""

# BEFORE: November 2026 is calculated on the detail
ON_DETAIL = UC01_QUERY.format(
    date_filter="AND d.full_date >= DATE '2026-11-01' AND d.full_date < DATE '2026-12-01'")

# The aggregate table: the same query, with no date filter, calculated only once
con.sql("CREATE TABLE daily_net_sales AS " + UC01_QUERY.format(date_filter=""))

# AFTER: the same question, on the aggregate table
ON_AGGREGATE = """
    SELECT sales_date, category, city, net_sales
    FROM daily_net_sales
    WHERE sales_date >= DATE '2026-11-01' AND sales_date < DATE '2026-12-01'"""


def measure(query: str, repetitions: int = 7) -> float:
    """Runs the query several times and returns the median in milliseconds."""
    timings = []
    for _ in range(repetitions):
        start = time.perf_counter()
        con.sql(query).fetchall()             # fetchall forces the result to be calculated
        timings.append((time.perf_counter() - start) * 1000)
    return statistics.median(timings)


for label, query in [("On fact_sales", ON_DETAIL),
                     ("On daily_net_sales", ON_AGGREGATE)]:
    rows = len(con.sql(query).fetchall())
    print(f"{label:26} {measure(query):8.1f} ms   {rows} rows")

How to read it:

  • range and random manufacture the data. 8% of the lines are marked as returned, the proportion of non-valid orders in October 2026.
  • UC01_QUERY is the query from lesson 02-05, with a placeholder ({date_filter}) that format fills in. ON_DETAIL fills it with the November range.
  • daily_net_sales is created with that same query with no date filter, just as the dbt model would do.
  • measure repeats each query seven times and takes the median, so that an anomalous run does not distort the result. time.perf_counter() is Python's high-precision clock.

An indicative output, on a laptop (the times depend on the machine, and the exact number of rows on the random data: run the program to get your own):

On fact_sales                  45.0 ms   17950 rows
On daily_net_sales              2.5 ms   17950 rows
On fact_sales On daily_net_sales
Rows in the main table 4,110,000 About 655,000 (at most 1,096 days × 12 × 50 = 657,600)
Joins in the query 3 0
Aggregation in the query Yes No
Result About 18,000 rows (30 days × 12 × 50) The same rows
Relative time 1 Around 10 to 20 times less

What matters is not the milliseconds, but the ratio and where it comes from: the second query neither joins nor aggregates, it only filters. In DuckDB, in memory and with a single user, both are instantaneous. On the real analytical engine, reading files from object storage and with 10 people at once, the same ratio separates a query that takes several seconds from one that takes tenths of a second: it is the difference between scraping the RQ-05 limit and meeting it comfortably. Besides, the less work each query does, the more concurrent queries the same compute can handle.

Pipeline optimization

The techniques above also speed up transformations, which are queries after all. There are also three that are specific to pipelines:

Incremental load instead of full load. Processing only what has changed is the biggest lever. At DataCorp there is a clear example: as long as orders.updated_at does not exist, every night the orders from the last 60 days are re-extracted, about 90,000. With that column, it would be enough to bring in those created or modified the day before: about 2,000. The extraction, the deduplication in the cleansed layer and the update of fact_sales would work with 45 times fewer rows. The best optimization of transform_cleansed is not technical: it is getting the store's team to add that column.

That said, it is best not to jump the gun: an incremental model is more fragile than a full table (lesson 04-02). You make incremental whatever the measurements show to be slow.

Parallelism. Tasks with no dependencies between them run at the same time. The four extractions of nightly_load_sales take 9 minutes in parallel; in series they would take the sum of the four. dbt does the same with the independent models in the graph, according to the number of threads configured. The limit: parallelism must not overload the source (the replica) or the engine.

Right-sized batches. Too small, and the fixed cost of each operation (opening a connection, creating a file, committing a transaction) dominates: inserting row by row is thousands of times slower than in bulk. Too large, and they exhaust memory and a failure forces you to repeat everything. In practice: read from the database in chunks of tens of thousands of rows, and split backfills by day or by month.

Compute sizing and concurrency

Once the queries read the minimum, what remains is deciding how much capacity to give them. Two ideas are enough at this level:

  • More capacity speeds up a query only up to a point. A badly designed query on a machine twice the size takes a little less time and costs twice as much. First you optimize; then you size.
  • Concurrency is a different problem from speed. A query that takes 2 seconds on its own can take 15 if nine others are competing for the same resources, or wait in a queue.

RQ-05 talks about roughly 40 users and 10 concurrent ones. The measures that make it achievable, in order of effectiveness:

Measure Effect on concurrency
Dashboards on aggregate tables Each query consumes a fraction of the resources
Result cache Repeated queries consume no compute
Separating transformation compute from query compute The load and the micro-batches do not take capacity away from the users
Per-query limits (time and data read) An excessive exploratory query does not block the others
Sizing for the real usage peak Enough capacity at 09:00 on a Monday

The third is a direct consequence of the principle of decoupling storage and compute: two independent compute capacities can work on the same data, one for svc_load and another for people and svc_bi. That way, the 10:10 stock levels micro-batch does not slow down the dashboard that Laura opens at 10:11.

The final check of RQ-05 is not done with an isolated query, but with a load test: replaying the dashboards' queries for a few minutes with 10 concurrent sessions and calculating the p95 of the whole set. Which specific engine and what size are decided in Module 6; how it adapts when the data or the users grow, in lesson 07-03.

Checklist

Before optimizing

  • [ ] Is there a numeric target (RQ-05: p95 < 5 s; load published before 06:00)?
  • [ ] Has the baseline been measured, with percentiles?
  • [ ] Is the slowest step known?

Queries

  • [ ] Are only the columns needed being requested?
  • [ ] Is the filter on the partition column, with no functions applied to it?
  • [ ] Does the plan show full scans or many discarded rows?
  • [ ] Do the estimated and actual rows reasonably match?
  • [ ] Is there any key value that concentrates the rows?

Storage

  • [ ] Does the partition match the usual filter?
  • [ ] Are the files a reasonable size? Is there compaction where micro-batches arrive?
  • [ ] Is the data sorted by the most frequently filtered column?
  • [ ] Do the extractions filter by an indexed column at the source?

Pre-aggregation

  • [ ] Do the dashboards read from aggregate tables?
  • [ ] Are the aggregates rebuilt in the same load as the detail, and do they reconcile with it?
  • [ ] Is adding up measures that cannot be aggregated again being avoided?

Pipelines and compute

  • [ ] Is whatever the measurements show to be slow incremental, and only that?
  • [ ] Do the independent tasks run in parallel?
  • [ ] Is the load compute separate from the query compute?
  • [ ] Has a test been run with 10 concurrent sessions?
  • [ ] Is the trend of the durations being monitored?

Common Mistakes and Tips

  • Optimizing without measuring. A week is spent speeding up a step that accounted for 3% of the time.
  • Optimizing what already complies. DataCorp's nightly load takes 40 minutes out of almost five hours. Making it incremental and more complex to gain 10 minutes adds nothing.
  • Solving it with a bigger machine. It hides the problem, makes it more expensive, and the problem comes back when the data grows.
  • SELECT * on a columnar engine. It reads every column; it is the most common way of multiplying the work for no reason.
  • Functions on the filter column. YEAR(sales_date) = 2026, CAST(... AS DATE), UPPER(city) = ... defeat indexes, pruning and statistics.
  • Measuring only once. The first run and the following ones differ. Repeat and use the median or the p95.
  • Aggregates that diverge from the detail. If they are updated at different times, two figures appear for the same thing: DataCorp's original problem.
  • Forgetting compaction. Micro-batches generate small files that degrade reads little by little, without any error.
  • Tip: keep the measurements. A table with the daily duration of each task and the weekly p95 of the queries turns optimization into an informed decision.
  • Tip: before optimizing a query, ask whether it is needed. Some of the slowest reports are no longer read by anyone.

Exercises

Exercise 1: Diagnosing queries

State what performance problem each query on the analytical engine has and rewrite it. fact_web_events is partitioned by date.

-- A
SELECT * FROM consumption.fact_web_events
WHERE CAST("date" AS VARCHAR) LIKE '2026-11%';

-- B
SELECT c.city, SUM(s.net_amount)
FROM consumption.fact_sales s
JOIN consumption.dim_customer c ON c.customer_sk = s.customer_sk
JOIN consumption.dim_date     d ON d.date_sk     = s.date_sk
WHERE d.year_number = 2026 AND d.month_number = 11
  AND s.order_status NOT IN ('cancelled', 'returned')
GROUP BY c.city;

Exercise 2: Where is the bottleneck?

After six months, the durations of nightly_load_sales are: extractions 10 min, validate_ingestion 1 min, transform_cleansed 95 min, tests_cleansed 4 min, publish_consumption 13 min, refresh_daily_net_sales 2 min. The team proposes paying for more compute capacity. What would you do first? Propose a hypothesis about the cause and how to check it.

Exercise 3: Measures that cannot be added up

Laura calculates the number of orders in November by adding up the num_orders column of daily_net_sales and gets 12% more than by counting orders in cleansed.orders. Explain the cause and propose two solutions.

Solutions

Exercise 1

A. Three problems: SELECT * reads every column; the function on date prevents partition pruning, so the files for all 13 months are opened; and the text comparison is unnecessary.

SELECT event_id, event_type, customer_id, product_id      -- only what is needed
FROM consumption.fact_web_events
WHERE "date" >= DATE '2026-11-01' AND "date" < DATE '2026-12-01';

B. The query is correct, but it recalculates on the detail something that is already aggregated. Since net sales can be added up again:

SELECT city, SUM(net_sales) AS net_sales
FROM consumption.daily_net_sales
WHERE sales_date >= DATE '2026-11-01' AND sales_date < DATE '2026-12-01'
GROUP BY city;

Besides being faster, it uses the official definition instead of repeating the status filter. Note: if you did need to query the detail, it would be worth filtering by the partition column of fact_sales as well ("month" = '2026-11'), because not every engine infers the pruning from a filter on the date dimension.

Exercise 2

Before spending, measure inside the bottleneck. transform_cleansed has gone from 14 to 95 minutes and accounts for 76% of the total; the other tasks have barely changed. That points to a cause specific to that task, not to a general lack of capacity.

Hypothesis: the cleansed.orders model deduplicates all the copies in the raw zone. Since 60 days are re-extracted every night (90,000 orders and their lines), in six months the raw zone accumulates about 16 million copies of orders and 40 million lines: the cost grows every night even if the business does not.

Check: measure the duration of each model (dbt records it), count the rows of raw.orders and get the plan of the deduplication query.

Remedies, in order: get the updated_at column so as to extract only what was modified; make the cleansed model incremental, deduplicating only the recent loads against what has already been consolidated; and check that the external table over the raw zone prunes by load_date. More compute would be the last resort, and it would only postpone the problem.

Exercise 3

num_orders is a count of distinct orders within each combination of day, category and city. An order with products from two categories appears in two rows, and when you add them up it is counted twice. The measure cannot be aggregated again across categories.

Solutions:

  1. For the total number of orders, count on the detail: COUNT(DISTINCT order_id) on fact_sales, or use a second aggregate table at the day × city grain, without category, where each order appears only once.
  2. Document the limitation in the column's description (for example, "orders with at least one line in the category; do not add up across categories") and, better still, have the analysis tool prevent that sum. Defining how each metric is aggregated is precisely the job of the semantic layer in Module 5.

Tip: faced with any aggregate, ask yourself about each measure whether it is a sum (it can be added up again), a distinct count or a ratio (they cannot).

Conclusion

Optimizing performance means applying a method: set a numeric target, measure the baseline, locate the bottleneck, change one thing and measure again. The execution plan shows how the engine resolves a query and gives away full scans, discarded rows and wrong estimates. On an analytical platform, almost every technique aims at reading less: requesting only the columns needed, filtering early and with no functions on the column, taking advantage of partition pruning and predicate pushdown, designing joins well and watching for skew; storing the data partitioned, sorted and in files of a reasonable size; and, above all, not calculating at query time what can be kept pre-aggregated, like daily_net_sales. In pipelines, incremental loading, parallelism and batch size do the rest, and in compute, separating the load from the queries protects concurrent users.

This lesson brings Module 4 to a close. DataCorp now knows how it is going to process its data: it loads it raw and transforms it in the destination with versioned, tested SQL, in daily batches and micro-batches, with the simplest tools that meet its requirements, coordinated by an orchestrator that retries, alerts and allows reruns, and with a method for keeping them within their deadlines. Every morning, before 07:00, consumption.fact_sales and consumption.daily_net_sales will contain data that is cleansed, reconciled and fast to query. But correct data that nobody analyzes changes no decisions: Laura and the other departments still have to turn it into answers. That is what Module 5 is about: it is devoted to data analysis and starts by asking what analyzing means and what types of analysis exist.

© Copyright 2026. All rights reserved