The Data Foundry

← All practice

Free · Local simulation · Intermediate

ADF Copy failed—why did the watermark advance?

One free Azure Data Factory configuration and recovery simulation; no Azure account required. Repair activity dependencies, Lookup output accessors and keyed upsert, then trace partial writes and captured-window recovery.

Original fictional ADF v2/Azure SQL shaped subset. Runs in this browser; no Azure, Fabric, ARM validation, SQL execution, keys, cloud bill or account persistence. Guided finite examples do not certify production skill.

Task and explicit source assumptions

Prerequisites: primary keys, incremental watermarks, upsert/insert and success/failure activity dependencies. The starter has three faults: lower≥, insert, and checkpoint after Completed. Editing actual JSON changes the modeled behavior; there is no reference-equality pass gate.

Complete editable fictional inputs

Source/target: dbo.Orders(order_id INT primary key, change_version INT positive, amount_cents INT nonnegative). Checkpoint: dbo.Watermark(orders,last_version INT). Values must be real INT32 numbers; Boolean/string/null coercion is rejected. Source rows inside a captured window must remain stable during retry.

Source at upper Lookup

order_idchange_versionamount_cents
11021500
21012000
31043000
41044000
5100500

Source during Copy

order_idchange_versionamount_cents
11021500
21012000
31043000
41044000
5100500
61056000

These source buttons preserve the actual target/checkpoint. Original upper104 precedes the arriving ID6v105; next source capture includes105. Explicitly capture new bounds after changing capture source.

Your bounded configuration

LookupOld + LookupNew → CopyOrders → AdvanceWatermark. Exact four names/types; equivalent activity/dependency ordering is accepted. firstRowOnly and includeUpper must be JSON true/false. Upsert identity is order_id, explicitly or through the shown PK. Unsupported fields/accessors/keys produce field diagnostics, not claims that Azure universally rejects them.

simulatorPredicate fields are local teaching fields, not actual ADF properties. name/variant are labels only. Only shown firstRow/value[0] accessors are interpreted; no arbitrary expressions, eval, linked services, network or secrets. The T-SQL below the run is an illustration and is never executed.

Capture, run and recover from actual state

Captured window: none — capture explicitly. Capture derives lower from the actual checkpoint and upper from source-at-capture; it does not copy rows or move the checkpoint.

Retry uses the retained partial target/checkpoint and same bounds. If checkpoint already advanced, this bounded model rejects a stale lower; capture a new window or explicitly restart the baseline. No hidden checkpoint reset or automatic rollback. Worker load5s/execution1s,250rows per table,60kcharacters per JSON editor,160kcharacters per trace; no arbitrary code execution.

Inspect the complete inputs and starter. Capture a window, then run your configuration. No Azure request or SQL execution.

Last accepted simulated state — may be partial

original baseline (not a run) · checkpoint 100 · 2 rows / 1500 cents. This is not a successful warehouse transaction or cloud save.

Actual current target

order_idchange_versionamount_cents
11001000
5100500

Actual activity trace

No run trace yet. Capture alone does not simulate Copy. Inputs and expected traces are visible below before effort.

27 disclosed cases and manual expected states

17base scenarios +10strict Boolean cases. These are public teaching examples. Selecting a case changes only this comparison; it never replaces current state or config. Loading its first starting inputs/config is a separate confirmed, assisted reset. Later multi-step outcomes must come from your actual runs.

Expected step1: Copy Failed / Advance Succeeded · checkpoint104

duplicate target primary key order_id=5 These are expected outputs, not injected state.

Expected selected step1

order_idchange_versionamount_cents
5100500
21012000
11021500
31043000
41044000

Expected committed step1

order_idchange_versionamount_cents

Zero rows.

Expected final target step1

order_idchange_versionamount_cents
11001000
5100500

Progressive help and production judgment

    Captured bounded window plus keyed upsert helps replay but does not make Copy and watermark one transaction. Staging plus transactional merge could strengthen atomicity but is not executed here. Real late/backdated updates, deletions, concurrent writers and checkpoint authority require a different consistency/CDC design.

    Only the supported typed subset is validated. Extra activities/fields/keys/accessors are rejected with field paths; absence of an error does not validate a real ADF deployment.

    Device-only saving and explicit recovery

    Save config/source drafts, captured bounds and accepted target/checkpoint including partial writes. No account/cloud durability or completion.

    Loading this device's saved copy…