KilnVM Live Labs /lab/dlt-duckdb-pipeline
Step 1 of 3 Docs Claim This Sandbox
Unclaimed Preview Sandbox · Hosted by KilnVM (15-run evaluation cap). Maintain this tool? Claim & embed on your docs →

Enforce Schema Contracts in dlt with DuckDB

Load local JSON records into DuckDB with dlt, catch a schema contract type violation, fix the malformed payload, and inspect loaded rows.

Step 1 of 3

Trigger a dlt schema contract violation on bad input

/workspace/pipeline.py enforces a strict data_type: freeze contract loading events.json into DuckDB, but row 2 has "invalid_amount" for amount.

Run dlt pipeline execution to capture the contract error in /workspace/contract-err.txt:

bash
python3 pipeline.py > contract-err.txt 2>&1 || true; tail -n 8 contract-err.txt