Instruction session · Thursday, October 29, 2026 · 11:00 to 13:00
The Bronze layer of the pharmacy chain sits in a local MinIO, in JSON, Parquet and CSV. In four rounds, a coding agent builds the pipeline that extracts it, conforms it and loads it into a DuckDB warehouse as the Silver layer, and while the agent works the slides explain what each step does and what it costs.
Project ritual
Each group reports the progress of its deliverables, the work planned for this session and the blockers that require a decision.
Each round starts with a prompt to the coding agent. While the agent writes the files, the slides explain the mechanism that those files implement, and the round ends with a review of what the agent produced.
src/extract.pySlides: how a query reads Object Storage, formats and partitionssrc/transform.pySlides: cleaning, formatting, type conversion, enrichment, quarantinesrc/load.pySlides: warehouse and lake, full and incremental loadsThe Bronze layer of the case, the target architecture and the local MinIO with the generated data.
Counts against the generator, rerun without new data, and a full load that must match the incremental one.
Quality attribute scenarios of the pipeline, what remains for the week and the self-study.
The pharmacy chain of the module has six stores and forty products. Lesson 3 defined the contracts of each layer, and this session builds the step that turns what arrived in Bronze into the conformed entities that Silver promises.
One file per day with about 1,500 lines. BAU-05 sends dates as dd/mm/yyyy, SOR-03 sends prices as text with a comma, and JUN-04 lost its connection on 17/10 and resent the whole day the next morning.
240 keys per day, already typed. Audits correct the count of two days earlier, and the correction arrives in a later extract. JUN-04 often closes the day without a count.
Separator ;, Latin-1 encoding, Portuguese headers, decimal comma and dates as dd/mm/yyyy. Some rows arrive without a quantity.
silver: store, product, sale_line, stock_position and delivery, each with a declared grain and its lineage, plus quarantine and load_log. Every row read from Bronze ends in one of these tables, and none of them stores the customer CPF.
The support files are in lab/lesson-4/ of the module. The group folder is lesson_04_etl/, the same one that Lessons 5 and 6 will extend.
mkdir -p lesson_04_etl/{specs,src,tests/fixtures,docs/adr,warehouse}
cp lab/lesson-4/* lab/lesson-4/.env.example lesson_04_etl/
cd lesson_04_etl
printf '.env\n.venv/\n__pycache__/\nwarehouse/\n' >> .gitignore
cp .env.example .env && git check-ignore .env
docker compose up -d --wait
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python generate_bronze.py # 45 objects, 4.4 MiB
echo "@AGENTS.md" > CLAUDE.md && claudetry_cast.customer_cpf never reaches the warehouse.source_file, ingestion_date, run_id and loaded_at.The console of the MinIO is at localhost:9001. In a Codespace, open the forwarded port. Any coding agent works; the rules are the same file.
generate_bronze.py is deterministic and prints how many defects it planted. Those numbers are the expected result of the pipeline, which is how the group knows whether the agent got the rules right.
| POS · sale lines | Rows | Expected in Silver |
|---|---|---|
| lines read (14 batches + 1 resend) | 21,353 | 21,000 unique sale_id |
| posted twice in the same file | 209 | removed by deduplication |
| JUN-04 resend of 17/10 | 241 | one row each, ingested 18/10 |
| orphan product (41, 42) | 68 | quarantine |
| quantity 0 or -1 | 41 | quarantine |
dd/mm/yyyy dates (BAU-05) | 3,447 | parsed, local time |
| price with comma (SOR-03) | 3,580 | converted to decimal |
| store code dirty | 2,070 | standardised |
| ERP and supplier | Rows | Expected in Silver |
|---|---|---|
| stock rows read | 3,420 | 3,360 keys of the grain |
| audit corrections (day − 2) | 60 | replace the older count |
negative on_hand | 14 | quarantine |
null on_hand (JUN-04) | 130 | kept as NULL, not imputed |
| deliveries read | 271 | one row per id_entrega |
| delivery without quantity | 13 | quarantine |
The agent writes specs/spec.md, specs/plan.md and specs/tasks.md. The prompt brings the facts measured in the Bronze, so that the requirements are written against data that exists.
### RF-04 · Deduplicate resent POS lines Origin: Bronze contract of Lesson 3. Description: when the same sale_id arrives more than once, Silver keeps the delivery with the latest ingestion_date and, within it, the latest source file. - Given that the terminal of JUN-04 sent part of 2026-10-17 in batch_2300.json and resent the whole day on 2026-10-18, when the full load processes both partitions, then silver.sale_line has one row per sale_id of JUN-04 on that day, all with ingestion_date = 2026-10-18.
Is there a requirement that every row read ends in Silver or in quarantine? Did the plan choose a key for each table and say how the incremental load knows where it stopped?
Both approaches extract, transform and load. They differ in the place where the transformation runs, and that place determines who pays for the computation, what the warehouse stores and how an error is corrected.
| Aspect | ETL · transform, then load | ELT · load, then transform |
|---|---|---|
| Computation | an engine outside the warehouse (Python, Spark, Dask, DuckDB) | the warehouse itself, in SQL (Redshift, ClickHouse, BigQuery, Snowflake) |
| What the warehouse stores | only conformed data | raw data and conformed data, with the sensitive fields of the raw |
| Correcting a rule | rerun the engine from Bronze, which must still exist | rerun the SQL over the raw tables, without a new extraction |
| Fits when | the warehouse is expensive per byte or per query, data must be masked before landing, or the logic needs code beyond SQL | the warehouse scales cheaply, analysts own the SQL (dbt), and the raw data may be kept under the same governance |
| Main risk | the engine becomes a second platform to operate | the warehouse becomes a lake of raw tables nobody conforms |
A layer is defined by the guarantee it gives to the next one. The transition from Bronze to Silver is the point where data stops being what the source sent and becomes an entity the organisation can trust.
| Property | Bronze · raw | Silver · working | Gold · curated (Lessons 5 and 6) |
|---|---|---|---|
| Content | each delivery as it arrived, resends included | one row per declared grain | facts and dimensions of an indicator |
| Types | text, except what the format carries | declared types, enforced | business types and units |
| Invalid rows | kept | in quarantine, with a reason | absent |
| Sensitive fields | present, access restricted | removed or pseudonymised | absent |
| Lineage | path of the object and partition | source_file, ingestion_date, run_id, loaded_at | reference to the Silver rows |
| Can be rebuilt from | the sources only | Bronze | Silver |
The last row is the reason why Bronze is read-only. If the pipeline altered Bronze, a wrong rule in Silver could no longer be corrected by recomputing it.
The same generator, with 73,500 sales per day, produced 1,120,749 POS lines in 15 days. Both paths were run on the professor's machine on 26/10/2026, with DuckDB 2.0.0 and the MinIO local.
| Measure | ETL (this pipeline) | ELT (raw first) |
|---|---|---|
| Rows written to the warehouse in the first step | 1,096,943 conformed | 1,120,749 raw |
| Rows of the warehouse that contain a CPF | 0 | 1,120,749 |
| Time of the first step | 6.0 s (extract, transform, load) | 2.9 s (load only) |
| Size of the POS data in the warehouse | 23 MiB without index · 142 MiB with key | 33 MiB raw, before Silver |
The purchasing team asks for a weekly indicator of customers who bought a continuous-use medicine twice in thirty days. The only identifier of the customer in the POS file is customer_cpf, and the AGENTS.md says it never reaches the warehouse. What should the Silver layer do?
The indicator becomes a simple query, and the warehouse holds the identifier of every customer.
A column customer_key computed with a secret key outside the warehouse. Who keeps the key, and what happens if it leaks?
Silver receives only the count per week and product. Can the team answer a new question about the same customers later?
Which data viewpoint of Lesson 3 records this decision, and which requirement of the spec changes?
The agent writes src/config.py and src/extract.py. The extraction does not convert types: it reads the three formats into staging tables with the file and the partition of each row.
con.execute("INSTALL httpfs; LOAD httpfs;")
con.execute("""CREATE SECRET lake (TYPE s3, KEY_ID ?, SECRET ?,
ENDPOINT 'localhost:9000', URL_STYLE 'path', USE_SSL false)""")
files = list_partitions(con, "source=pos/entity=sale_line",
after=watermark) # one LIST
con.execute(f"""CREATE TEMP TABLE raw_sale AS
SELECT * FROM read_json({files}, format='newline_delimited',
hive_partitioning=true, filename='source_file',
columns={{sale_id:'VARCHAR', unit_price:'VARCHAR', ...}})""")raw_sale 21,353 rows from 15 files, raw_stock 3,420, raw_delivery 271. With after=2026-10-25, only the files of 26/10.
Does every staging row have source_file and ingestion_date? Does the supplier name read "Distribuição", with the cedilla? Does the incremental path read a list of files?
Lesson 2 of the module wrote the Parquet sample to the raw zone. The extraction now reads that kind of storage at scale, and three properties of object storage shape how it should be read.
bronze/source=pos/entity=sale_line/ingestion_date=2026-10-17/batch_2300.json is one key. The slashes and the name=value segments are a convention that engines read as Hive partitions, so the layout of the keys is the index of the lake.
An object is replaced, never edited. Reads can ask for a byte range with the Range header, which is what lets an engine read the footer and a few columns of a Parquet file without downloading it.
On Amazon S3 each request has a price and a latency of tens of milliseconds. Thousands of small files cost more to list and open than a few large ones with the same bytes.
Each format of the case needs different options in the reader. The options that matter are the ones that tell the engine what the file does not say about itself.
| Format | What the file carries | What the reader must be told | Reader in the case |
|---|---|---|---|
| CSV | text by rows; no types, no encoding, no schema beyond the header | separator, header, encoding, decimal and date formats; read as text to avoid wrong inference | read_csv(files, delim=';', encoding='latin-1', all_varchar=true) |
| JSON Lines | one object per line; field names and a few types (number, string) | that it is newline-delimited, and the columns, because inference from a sample fails when one terminal sends a price as text | read_json(files, format='newline_delimited', columns={...}) |
| Parquet | schema, types, row groups, column chunks, min and max of each chunk, compression | nothing about the content; only the files and the partitioning | read_parquet(files, hive_partitioning=true) |
filename='source_file' adds the key of the object to each row. Without it, a wrong row in Silver cannot be traced to its delivery.
hive_partitioning=true turns ingestion_date=2026-10-17 in the key into a column of the row.
Reading as text moves every conversion to the transformation, where a failure becomes a quarantine reason instead of an aborted run.
The typed POS lines of 14 days at 73,500 sales per day were written as CSV, JSON Lines and Parquet in the bucket. DuckDB 2.0.0 ran each query with the HTTP cache off, and the HTTP log gave the requests and the bytes.
| Format | Size | count(*) | sum of one store | GETs | Time |
|---|---|---|---|---|---|
| CSV | 90 MiB | 118 MiB read | 120 MiB read | 63 | 0.22 s |
| JSON Lines | 200 MiB | 232 MiB read | 232 MiB read | 117 | 0.36 s |
| Parquet | 25 MiB | 0.03 MiB read | 0.12 MiB read | 7 | 0.011 s |
store_code in each row group to skip the groups of other stores, and downloads two columns of the rest. CSV and JSON have no footer and no statistics, so both questions download the whole file, and a little more than its size because the reader fetches overlapping blocks. On a laptop the difference is a fraction of a second; on S3, with latency and price per request, it is the cost of the pipeline.The incremental extraction must read only the partition of 26/10. Three ways of asking for it were measured on the POS JSON of the lab bucket, with the HTTP cache off.
| How the extraction asks for the day | LIST | HEAD | GET | Read |
|---|---|---|---|---|
| glob of all days, no filter (full load) | 1 | 16 | 48 | 14.15 MiB |
glob of all days with WHERE ingestion_date = '2026-10-26' | 1 | 16 | 18 | 5.35 MiB |
list of the files of the new partition, from glob() | 1 | 1 | 2 | 0.63 MiB |
Parquet of the ERP, glob with the same WHERE | 1 | 0 | 2 | 0.01 MiB |
The Adalove description of the session mentions Spark and Dask. Each answers the same question, what to do when the data does not fit in the memory of one process, in a different way.
Executes in vectors of rows, in parallel threads, and spills to disk when an operator exceeds the memory limit. Fits the lab and most Silver loads up to hundreds of GB on one machine.
Splits the files into partitions processed by executors on several machines. The self-study on RDDs explains the model: immutable partitions, lazy transformations and recomputation from lineage after a failure.
Splits a dataframe into many pandas dataframes and schedules them on threads, processes or a cluster. Fits teams whose code is already pandas.
| What changes with scale | What does not change |
|---|---|
| the number of machines, the size of the partitions, the cost of moving data between them (shuffle) in deduplications and joins | the contract of Silver, the rules of the transformation, the accounting of rows and the idempotency of the load; the specification written in round 1 is valid for any of the three engines |
ACME changes its integration: instead of one acme_0930.csv per morning, it writes one CSV per delivery, about 300 files a day of 400 bytes each. In a year, the partition folder of deliveries has 109,500 objects. What happens to the extraction, and what should the pipeline do?
The glob and the list of files still work. How many LIST pages and GET requests does a full load make, and what does that cost on S3?
A job concatenates the day into one file. Does that break the rule that Bronze is read-only, and where would the compacted file go?
The extraction of each day writes one Parquet staging file per partition, and later runs read the staging. Which layer is that file in?
If a file of 25/10 arrives on 27/10, in the folder of 25/10, does the incremental load see it?
name=value segments become partition columns, and the extraction chooses files by them.The agent writes src/transform.py. Each conformed table has a column reason, NULL for valid rows and the first broken rule otherwise, so the split between Silver and quarantine is one query.
| Technique | Rule in the case |
|---|---|
| Cleaning | dedup sale_id by latest ingestion; dedup stock key by latest extract; quarantine orphans, quantity ≤ 0, negative stock, delivery without quantity; NULL on_hand kept |
| Formatting | upper(trim(store_code)); sold_at from ISO or dd/mm/yyyy in local time; comma to point in prices |
| Type conversion | try_cast and try_strptime; a failure becomes a reason |
| Enrichment | store_id by lookup, line_amount, sold_date, is_stockout, lineage; CPF dropped |
t_sale 21,000 rows: 20,891 valid, 68 orphan_product, 41 invalid_quantity. t_stock 3,360 with 14 negative_on_hand. t_delivery 271 with 13 missing_quantity.
Is sold_at of BAU-05 at the same local time as its text? Is there any column with CPF? Is rows after dedup = valid + quarantined a test?
The Adalove description lists cleaning, formatting, type conversion and enrichment. In the case each technique answers a defect that the generator planted, and each defect has a count that the test can check.
Duplicates are removed by key with a rule for which copy wins. Invalid values go to quarantine. A null is kept when it means "not measured": imputing zero to the 130 missing counts of JUN-04 would invent 130 stock-outs.
One representation per concept: store codes in upper case without spaces, one timestamp type in local time, prices with a decimal point. Formatting comes before any join or comparison.
try_cast returns NULL instead of an error, which turns a bad value into a quarantine reason. A plain CAST would abort the run on the first price written as text.
Lineage columns, the store_id found from the code, line_amount, sold_date and is_stockout. Derived fields that every consumer would compute are computed once.
upper(trim()) would send 2,070 valid lines to quarantine.WITH typed AS (
SELECT r.sale_id, s.store_id, r.terminal_id,
try_cast(r.product_id AS INTEGER) AS product_id,
try_cast(r.quantity AS INTEGER) AS quantity,
try_cast(replace(r.unit_price, ',', '.') AS DECIMAL(10,2)) AS unit_price,
coalesce(try_strptime(r.sold_at, '%Y-%m-%dT%H:%M:%S%z')::TIMESTAMPTZ
AT TIME ZONE 'America/Sao_Paulo', -- ISO with offset
try_strptime(r.sold_at, '%d/%m/%Y %H:%M:%S')) AS sold_at, -- BAU-05
r.source_file, r.ingestion_date::DATE AS ingestion_date,
row_number() OVER (PARTITION BY r.sale_id
ORDER BY r.ingestion_date DESC, r.source_file DESC) AS rn
FROM raw_sale r
LEFT JOIN silver.store s ON s.store_code = upper(trim(r.store_code)))
SELECT * EXCLUDE (rn), CASE
WHEN store_id IS NULL THEN 'unknown_store'
WHEN product_id NOT IN (SELECT product_id FROM silver.product)
OR product_id IS NULL THEN 'orphan_product'
WHEN quantity IS NULL OR quantity <= 0 THEN 'invalid_quantity'
WHEN unit_price IS NULL THEN 'invalid_price'
WHEN sold_at IS NULL THEN 'invalid_timestamp'
END AS reason
FROM typed WHERE rn = 1; -- customer_cpf is never selectedThe query never loops over rows in Python. On the 1.1 million lines of the benchmark, the transformation of the three entities took 1.0 s.
The reference pipeline, run on 26/10/2026 over the lab bucket, closes the accounting of each entity. These are the numbers the group's tests should reproduce.
| Entity | Read from Bronze | After deduplication | Silver | Quarantine | Reasons |
|---|---|---|---|---|---|
| sale_line | 21,353 | 21,000 | 20,891 | 109 | 68 orphan_product · 41 invalid_quantity |
| stock_position | 3,420 | 3,360 | 3,346 | 14 | 14 negative_on_hand |
| delivery | 271 | 271 | 258 | 13 | 13 missing_quantity |
on_hand, counted by a check, not imputedThe 68 lines with product_id 41 or 42 are in quarantine. On Monday, the ERP adds products 41 and 42 to the master file, with a new product.csv in the partition of that day. The sales were real. What should happen to the quarantined lines?
The quarantine is a record of the past. The weekly indicator of those days stays without 68 lines. Who is told?
A full load rebuilds Silver with the new master and the lines become valid. Is the full load cheap enough to be the answer?
Each run tries the quarantined rows again before the new ones. What makes this safe, and what makes it dangerous?
Is orphan_product a property of the row or of the moment in which the row was checked?
try_cast turns a bad value into a quarantine reason; one reason per row, the first rule broken.The agent writes src/load.py and src/pipeline.py. The full mode rebuilds Silver from all partitions. The incremental mode reads the watermark of the load log and merges only the new partitions by key.
BEGIN; MERGE INTO silver.stock_position t USING (SELECT * FROM t_stock WHERE reason IS NULL) s ON t.store_id = s.store_id AND t.product_id = s.product_id AND t.date = s.date WHEN MATCHED THEN UPDATE -- audit correction WHEN NOT MATCHED THEN INSERT; -- new day INSERT INTO silver.load_log VALUES (run_id, 'stock_position', 'incremental', '2026-10-26', '2026-10-26', 245, 244, 1, ...); COMMIT;
Full of 14 days: sale_line 20,891. After --day 2026-10-26 and an incremental run: 22,380, the same as a new full load. A second incremental run changes nothing.
Is the full mode a rebuild, not a delete row by row? Is the whole run one transaction? Does the ADR use the group's own measurements?
The pipeline reads from a lake and writes to a warehouse. The two are complementary: the lake keeps everything that arrived, cheaply and in any format, and the warehouse serves typed tables to many concurrent queries.
| Aspect | Data Lake (MinIO, S3) | Data Warehouse (DuckDB here; ClickHouse, Redshift) |
|---|---|---|
| Schema | on read: the reader decides the types | on write: the load fails or quarantines what does not fit |
| Unit of storage | files and objects | tables, columns, constraints |
| Updates | replace whole objects | INSERT, UPDATE, MERGE in transactions |
| Who reads | pipelines, data scientists, engines | analysts, BI tools, applications, through SQL |
Columnar and open source. Tables of the MergeTree family are sorted by an ORDER BY key and merged in the background. The key orders and indexes the data but does not enforce uniqueness, so deduplication is done in the ETL or with ReplacingMergeTree. Reads S3 directly with the s3() table function.
Columnar, managed, massively parallel. Loads from S3 with COPY, distributes rows by a distribution key and orders them by sort keys. Primary keys are informational and not enforced, and MERGE performs the upsert of the incremental load.
| Strategy | What it does | Fits when | Risk |
|---|---|---|---|
| Full rebuild | creates the tables again from all of Bronze | small volumes, a rule changed, or the first load | cost grows with history; must swap atomically so readers never see an empty table |
| Append | inserts the new rows | immutable events that never arrive twice | a resend duplicates rows; the 241 lines of JUN-04 would appear twice |
| Incremental merge (upsert) | MERGE by key on the new partitions | sources that resend and correct, as in the case | depends on a correct key and on a watermark that sees late files |
| Partition overwrite | replaces the Silver rows of each reprocessed day | data partitioned by the same date it arrives | corrections of other days, like the audits of day − 2, are lost |
The highest ingestion_date already loaded, kept in load_log. The next run reads only what is after it.
Running the same input twice gives the same Silver. MERGE by key provides it; append does not.
One transaction per run. A failure in the third table leaves the first two as they were.
Reference pipeline over the benchmark bucket, on the professor's machine, 26/10/2026, DuckDB 2.0.0 and local MinIO. Times are of one run; on S3 the extraction share grows with the latency of each request.
| Run | POS rows read | Extract | Transform | Load | Total |
|---|---|---|---|---|---|
| Full, 14 days, empty warehouse | 1,046,514 | 1.1 s | 1.0 s | 3.2 s | 5.4 s |
| Incremental, day 26/10 | 74,235 | 0.2 s | 0.2 s | 0.3 s | 0.7 s |
| Full, 15 days, drop and rebuild | 1,120,749 | 1.2 s | 1.0 s | 3.4 s | 5.6 s |
| Full, 15 days, DELETE then MERGE into the full tables | 1,120,749 | 1.2 s | 1.0 s | 32.4 s | 34.6 s |
sale_line takes 142 MiB with its key and 23 MiB without it, and why columnar warehouses such as ClickHouse and Redshift do not enforce primary keys and leave uniqueness to the ETL.Silver of this session is conformed, close to the shape of the sources, with each table keyed by its grain. Lesson 5 models it in Third Normal Form or Data Vault, and Lesson 6 builds the cubes of Gold on top of it.
sale_line keeps store_id and product_id and leaves names and cities in store and product, which avoids rewriting thousands of rows when a store changes name. It also keeps the derived line_amount and sold_date, a small denormalisation that every query of Gold would otherwise repeat.
-- grain of stock_position SELECT store_id, product_id, date FROM silver.stock_position GROUP BY ALL HAVING count(*) > 1; -- referential integrity of sale_line SELECT sale_id FROM silver.sale_line l ANTI JOIN silver.product p USING (product_id); -- accounting of the last run SELECT entity FROM silver.load_log WHERE run_id = ? AND rows_loaded + rows_quarantined > rows_read;
On 05/11 the team discovers that the rule of BAU-05 read dd/mm/yyyy as mm/dd/yyyy since 26/10, so sales of 05/11 were loaded as 11/05. The rule is fixed. The watermark is 05/11, so the next incremental run will not touch the ten wrong days. What should the team run?
Rebuild Silver from all of Bronze. How long does it take when the history has two years?
Set it to 25/10 and run the incremental load. Does MERGE by sale_id correct sold_at of rows that already exist?
A parameter --from 2026-10-26 that reprocesses a window without moving the watermark. What does the load log record?
The weekly indicator of those weeks was already published. Who is told, and how does the indicator show that it changed?
pytest -q python -m src.pipeline full python generate_bronze.py --day 2026-10-26 python -m src.pipeline incremental python -m src.pipeline incremental # nothing after the watermark python -m src.pipeline full # same counts as the incremental python -c "import duckdb; c = duckdb.connect('warehouse/pharmacy.duckdb', read_only=True); \ print(c.sql('SELECT entity, reason, count(*) FROM silver.quarantine GROUP BY ALL'))"
| Table | 14 days | + 26/10 |
|---|---|---|
| sale_line | 20,891 | 22,380 |
| stock_position | 3,346 | 3,585 |
| delivery | 258 | 281 |
| quarantine | 136 | 150 |
Each scenario has a stimulus and a measurable response. The group records them in docs/ with the evidence of its own run, as in the ATAM of Lesson 3.
| Stimulus | Expected response | Evidence |
|---|---|---|
| a terminal resends a whole day | one row per sale_id, latest delivery kept | 241 rows of JUN-04 on 17/10, ingested 18/10 |
| an audit corrects the stock of day − 2 | the older count is replaced, no new row | grain query returns zero rows |
| a price arrives as text with a comma | converted, never an aborted run | 3,580 lines of SOR-03 in Silver |
| the incremental load runs twice | the second run changes nothing | load log with "nothing after watermark" |
| the run fails in the third table | the warehouse stays as before the run | test that raises inside the transaction |
| a new day of 74,000 lines arrives | loaded in time proportional to one day | incremental time against full time, measured by the group |
The four prompts fit the session if each review is short. What does not fit continues during the week, with the material and the lab script.
specs/ with spec, plan and tasks reviewedsrc/extract.py and src/transform.py with tests passinglesson_04_etl/ with AGENTS.md, specs/, src/, tests/ passing and docs/adr/ADR-001-full-and-incremental-load.md. The warehouse file is not committed: anyone rebuilds it with the generator and the full load.Five readings and videos assigned on Adalove. They extend the four blocks of the session and prepare the modelling of Silver in Lesson 5.
freeCodeCamp video; watch from 1:05 to 1:31, where a pipeline is built from scratch with SQL and Docker.
Microsoft guide comparing ETL and ELT processes and architectures. Extends block 1.
Stages, benefits, challenges and good practices of ETL, independent of technology.
How transactional and analytical systems store and process data. Extends block 4.
Official Spark guide to resilient distributed datasets. Extends the slide on large volumes.
The four blocks in depth, the four prompts in full, the lab script and the mistakes that agents usually make in this pipeline.
ETL: Object Storage to Data Warehouse · 29/10/2026 · Prof. Afonso
By the end of the session, students should be able to build with a coding agent an ETL pipeline that extracts JSON, Parquet and CSV files from a local MinIO, cleans, formats, converts and enriches them with every rejected row in quarantine, and loads the Silver layer of a DuckDB warehouse in full and incremental modes, justifying each choice with measurements.
Practice and theory interleaved. The groups send four prompts to a coding agent (specification, extraction, transformation and load), and while the agent writes each step the professor explains its mechanism with animations and measured examples. Each round ends with a review against the expected counts, and the session closes with the verification of accounting, idempotency and privacy.