Skip to content

Commit 98ee4d9

Browse files
committed
docs(session): end Session 5 — medallion green end-to-end in Fabric
- CHANGELOG: new sub-section for the 2026-05-29 first-green cloud run + operational fixes (Spark conf for identity, lakehouse GUIDs in OneLake paths, 01 validation cell robust to large bundles, public_libraries.yml with pinned boto3/botocore, fabric-deploy.yml disabled, FabricPlatform files_path helper). - ARCHITECTURE: lead paragraph rewritten for ADR-022 two-tier model (LocalLite + Fabric as independent end-to-end impls); Fabric execution status row flipped from '🔜 Session 5' to '✅ green on F4'; execution- surfaces paragraph updated to reflect Fabric notebooks as their own surface (not 'upcoming'). - HANDOFF: date bumped to 2026-05-31; content unchanged (state matches the pause point — capacity paused, all storage persists, next task is screenshot confirmation → Data Pipeline build → Power BI → PR). - Generators (gen_data_dictionary, gen_corpus_schema) re-run, no diff. - pytest: 128 passed + 1 skipped (workspace-only).
1 parent bdd2bf0 commit 98ee4d9

3 files changed

Lines changed: 79 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,67 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
88
### Session 5 (in progress) — Fabric Spark-native rewrite (ADR-022) + dedup fix + Power BI
99
Plan: [docs/roadmap/fabric-execution-plan.md](docs/roadmap/fabric-execution-plan.md).
1010

11+
#### Milestone (2026-05-29 — first green cloud run)
12+
- **Notebooks 00–10 ran successfully end-to-end on Fabric F4 capacity**
13+
against `SAMPLE_SIZE=100` Coherent bundles. All 10 Silver tables +
14+
`gold.encounter_summary` + Bronze/Gold manifests materialized in the
15+
`scribe_iq_synthea_coherent` lakehouse.
16+
- Branch `feat/fabric-spark-native` pushed to **both** GitHub (canonical
17+
mirror) and Azure DevOps (Fabric Git Integration source) via
18+
multi-push origin. Single `git push` fans out to both.
19+
20+
#### Added (2026-05-29)
21+
- `fabric/notebooks/01_bronze_ingest.Notebook/` — self-contained Bronze
22+
ingest. Pulls Synthea Coherent from `s3://synthea-open-data/coherent/`
23+
via anonymous boto3, round-robin partitions into `cohort=A,B,C` under
24+
`Files/bronze/fhir/`, writes an `IngestManifest`-shaped JSON under
25+
`Files/bronze/_metadata/`. `SAMPLE_SIZE` knob for fast demo (`100`) vs
26+
full corpus (`None`).
27+
- `fabric/environments/public_libraries.yml` — pip-block file Fabric's
28+
Environment "Import .yml" UI accepts; pins `boto3==1.35.36` +
29+
`botocore==1.35.36` for reproducibility.
30+
- `FabricPlatform.files_path(subpath)` — Files/-rooted URI helper for
31+
non-table artifacts (Bronze JSON, Gold manifest). One place owns the
32+
GUID-vs-name path detail.
33+
34+
#### Changed (2026-05-29 — operational fixes from cloud run)
35+
- `FabricPlatform.ensure_env` now reads from Spark conf
36+
(`trident.workspace.id`, `trident.lakehouse.id`) instead of
37+
`mssparkutils.env.getWorkspaceId()` — the latter is a Synapse API
38+
not present on Fabric. Returns workspace + lakehouse GUIDs (not name);
39+
display name is best-effort, informational only.
40+
- OneLake paths now use lakehouse GUID throughout (drop `.Lakehouse`
41+
suffix). Required for tenants with `FriendlyNameSupportDisabled`
42+
(the trial tenant has this) — `<name>.Lakehouse` paths get HTTP 400.
43+
Notebooks 00, 01, 10 updated to use `platform.files_path()` instead
44+
of inline path construction.
45+
- `00_setup` Gate 1 reads `spark.conf.get("trident.workspace.id")`
46+
(drops the broken `mssparkutils.env.getWorkspaceId` call).
47+
- `01_bronze_ingest` validation cell uses `spark.read.text(wholetext=True)`
48+
to read the sample bundle — `mssparkutils.fs.head` silently truncates
49+
at ~100 KB even when a larger maxBytes is passed, breaking
50+
`json.loads`. Sample-histogram wrapped in try/except so a parse
51+
failure prints a one-liner instead of halting the cell (manifest
52+
write below it now always runs).
53+
- `fabric/environments/lakehouse_env.yml` — documentation-style spec
54+
updated to match ADR-022; drops `pyarrow`/`pydicom`/`python-dateutil`
55+
(not used by the pure-Spark Fabric tier — Fabric runtime supplies
56+
pyarrow; pydicom is local-only; date parsing is Spark-native).
57+
- `.github/workflows/fabric-deploy.yml` renamed
58+
`fabric-deploy.yml.disabled`. User removed the `fabric-prod` GitHub
59+
Environment; the workflow's `environment: fabric-prod` would fail on
60+
trigger. Matches the existing `aws-deploy.yml.disabled` /
61+
`databricks-deploy.yml.disabled` convention. Active deploy path is
62+
Azure DevOps Git Integration + manual UI wheel upload.
63+
64+
#### Tests (2026-05-29)
65+
- `test_fabric_platform.py` updated for GUID-based API:
66+
`test_storage_path_builds_onelake_uri` rewritten for the GUID shape
67+
(no `.Lakehouse` suffix). New `test_files_path_builds_onelake_uri`
68+
covers the helper. `FabricPlatform(lakehouse_id=...)` constructor
69+
arg replaces `lakehouse_name=...` for path-shape tests.
70+
- Full suite: 128 passed + 1 skipped (workspace-only).
71+
1172
#### Added (2026-05-29 — ADR-022 architecture pivot)
1273
- **ADR-022** (Independent per-platform implementations) — supersedes ADR-002
1374
(LakehousePlatform ABC as universal contract), ADR-004 (pa.Table as

HANDOFF.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# HANDOFF — Session 5 · Medallion green end-to-end in Fabric
2-
**Date:** 2026-05-29 · **Branch:** `feat/fabric-spark-native` · **Plan:** [docs/roadmap/fabric-execution-plan.md](docs/roadmap/fabric-execution-plan.md)
2+
**Date:** 2026-05-31 · **Branch:** `feat/fabric-spark-native` · **Plan:** [docs/roadmap/fabric-execution-plan.md](docs/roadmap/fabric-execution-plan.md)
33

44
> State only. For what happened in this (or any prior) session see [CHANGELOG.md](CHANGELOG.md).
55
> Narrative belongs there, not here.

docs/ARCHITECTURE.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ structure changes — it tracks reality, not the plan.
77

88
## Overview
99

10-
A medallion healthcare lakehouse on Synthea Coherent (synthetic FHIR R4). Engine-agnostic
11-
**pure transforms** return Apache Arrow tables; a **platform abstraction** handles all I/O
12-
so the same code runs locally (Polars + delta-rs) or on Microsoft Fabric. Today the
13-
**Bronze → Silver → Gold** path is fully built and runs end-to-end on the full
14-
1,278-patient dataset locally (143,946 encounter summaries), under either the
15-
`core.surfaces.cli.pipeline` CLI or a **Dagster** software-defined asset graph (ADR-015/016);
16-
**Fabric execution** is next.
10+
A medallion healthcare lakehouse on Synthea Coherent (synthetic FHIR R4). Per
11+
**ADR-022** the lakehouse runs as **two independent end-to-end implementations** that
12+
emit the same Gold corpus contract: a LocalLite tier (`core/` — Polars + delta-rs)
13+
and a Fabric tier (`fabric/` — Spark + OneLake Delta), each with its own Silver,
14+
Gold, and validation stack written engine-native. Today the **Bronze → Silver → Gold**
15+
path is fully built on both tiers — locally it runs end-to-end on the full
16+
1,278-patient dataset (143,946 encounter summaries) via the `core.surfaces.cli.pipeline`
17+
CLI or a **Dagster** software-defined asset graph (ADR-015/016); on Fabric it ran
18+
green end-to-end on F4 capacity against a 100-patient demo sample via notebooks 00–10.
1719

1820
```mermaid
1921
flowchart TD
@@ -41,11 +43,13 @@ flowchart TD
4143
class B,ST,G done;
4244
```
4345

44-
The same transforms run under **three execution surfaces** (ADR-015/016): the
45-
dependency-light `core.surfaces.cli.pipeline` CLI, a **Dagster** asset graph (cohorts =
46-
partitions, `validate_table` = asset checks, sensor watches `data/bronze/fhir/`),
47-
and the upcoming Fabric notebooks. The orchestration tier imports the pure
48-
transforms and platform — the lakehouse never imports orchestration.
46+
The LocalLite tier runs under **two local execution surfaces** (ADR-015/016): the
47+
dependency-light `core.surfaces.cli.pipeline` CLI and a **Dagster** asset graph
48+
(cohorts = partitions, `validate_table` = asset checks, sensor watches
49+
`data/bronze/fhir/`). The Fabric tier runs under its own independent execution
50+
surface — `fabric/notebooks/00–10` (`.Notebook/notebook-content.py` source-of-truth,
51+
ADR-021), each instantiating `FabricPlatform()` directly. The orchestration / notebook
52+
tiers import the per-tier transforms and platform — neither tier imports the other.
4953

5054
For **read-only exploration** the same Delta tables are queryable from a
5155
**DuckDB UI notebook** ([`docs/demo/notebooks/demo_notebook.sql`](demo/notebooks/demo_notebook.sql))
@@ -63,7 +67,7 @@ renderers, three audiences. Recording guide: [`docs/demo/PLAYBOOK.md`](demo/PLAY
6367
| Silver | ✅ built (local) | 10 Delta tables + `ingest_log` | CDC enabled; validated; MERGE-upsert per cohort |
6468
| Gold | ✅ built (local) | `encounter_summary` Delta + manifest | 1 row/encounter; CDC; as-of-date problem list; corpus contract v1.1.0 (ADR-012/014) |
6569
| Dagster orchestration | ✅ built (local) | `core/orchestration/dagster/` package | medallion as asset graph; cohort partitions; `validate_table` as asset checks (ADR-015/016) |
66-
| Fabric execution | 🔜 Session 5 | OneLake | notebooks 00–10; S3 shortcut; same transforms |
70+
| Fabric execution | ✅ green end-to-end (F4, SAMPLE_SIZE=100) | OneLake | independent Spark-native impl (ADR-022); notebooks 00–10; anonymous S3 ingest in 01; full 1,278-bundle re-run pending |
6771

6872
## Module map
6973

0 commit comments

Comments
 (0)