48-section interactive internals reference, unit-tested utilities, and executed notebooks
for Microsoft Fabric Spark — Runtime 1.3 (Spark 3.5 / Delta 3.2) and Runtime 2.0 (Spark 4.x
/ Delta 4.2), configuration-driven throughout. All links are relative: keep the files in one
folder (as unpacked from fabric_spark_toolkit.zip) and everything below just
works. Notebooks open as rendered previews (browsers cannot display raw .ipynb files)
with a download link alongside.
fabric_best_practices.ipynb PATTERNS
Runtime-portable session config, Polars/DuckDB/delta-rs on Delta, DV/CDF/liquid
clustering executed, metadata loop, runMultiple DAG, Fabric-only paste cells.
spark_auto_config_utility.ipynb TUNING
Analyze data + cluster → recommend, apply (runtime scope) and emit %%configure
(session-start scope).
nb_lakehouse_health_audit.ipynb OPS
Inventory every Delta table: size, files, DV/CDF, pending deletion vectors, last
OPTIMIZE → flagged health report.
nb_lakehouse_maintenance.ipynb OPS
Acts on the health report: OPTIMIZE / REORG PURGE / VACUUM. Dry-run by default, fully
logged, post-checked.
nb_data_quality.ipynb OPS
Declarative rules table, generic runner, severity gates: error stops the pipeline, warn
quarantines and continues.
nb_ingestion_generic.ipynb OPS
One parameterized worker for N entities: watermark-gated incremental MERGE, run-logged,
self-proving idempotency.
nb_nee_fallback_analyzer.ipynb MEASURE
Runs a query set with NEE on vs off, computes native coverage per query from the plans,
and quantifies the ANSI×NEE trade-off on Runtime 2.0.
nb_metadata_sqldb_prototype.ipynb METADATA
Fabric SQL Database metadata framework: full DDL, pyodbc+Entra connectivity,
forward-only watermarks, batched run logs, and the 11 gotchas that save days.
nb_cdf_incremental_pattern.ipynb INCREMENTAL
CDF-driven deltas without MLV: SQL Database watermark table, version-bounded reads with
pushdown asserted from the plan, net-change collapsing, idempotency proof and the
retention guard.
nb_api_zip_ingestion.ipynb INGESTION
Rate-limited API crawl (token bucket, Retry-After, resumable cursor) and streamed
zip-over-HTTPS, landing into datetime partitions as gzipped NDJSON, with CU-estimate
logging.
nb_fabric_log_diagnostics.ipynb DIAGNOSTICS
Fabric Spark Monitoring REST API client (jobs/stages/tasks/advisor/resourceUsage) that
turns "this cell is slow" into a ranked diagnosis - skew, spill, Advisor findings.
Demo-mode tested; live-API paths documented.
nb_eventlog_analysis.ipynb EVENT LOGS
Paste any Fabric URL shape, download the Spark event log, and get a real diagnosis:
critical path, skew ratios, spill, GC, findings. Proven against a real event log
generated in-session.
nb_workspace_monitoring.ipynb OPS
KQL over the Monitoring Eventhouse (ItemJobEvents etc.), alerting guidance, and the
Spark-logs route: emitter → Event Hubs → Eventstream → Eventhouse.
Design choice: one adaptive internals document with a runtime selector rather than
per-runtime sub-documents — duplicated HTML drifts out of sync the first week. Modularity
lives here instead: this hub links every asset, and the big document deep-links per section.
Heuristic thresholds across the toolkit are tagged as such; validate against your own Spark
UI and Capacity Metrics data. Notebooks were executed on Spark 3.5 + Delta 3.2 locally;
Fabric-only cells are guarded and labelled.