Lakeflow Connect: validate the cut

Lakeflow Connect: validate the cut

An existing historical dataset looks like the fastest way to start incremental ingestion. The risk appears when nobody can say which changes it already contains. A repeated row can be repaired; a deletion lost between history and CDC often leaves a table that looks intact but is wrong. Before reducing a backfill, prove where the base ends and changes begin. Any volume reduction also requires a supported path; proving the cut neither guarantees it nor can be skipped.

The difference between a proven cut and a presumed one only shows up weeks later, when somebody asks where one specific row came from. The investigation starts without a declared boundary: nobody knows whether the defect sits in the history, in the replay window or in the transformation. Declaring the boundary up front costs hours; rebuilding the proof afterwards costs weeks.

This article covers ingestion entry and the cut, not subsequent Silver recovery. The study is entirely synthetic and local. It does not configure Lakeflow Connect, read SQL Server, or demonstrate native bootstrap over an external historical dataset.

Read in Português.

What is a validated cut?

A cut is a continuity contract: the base includes every change through an inclusive position, and the next processing starts after it. It must identify the table, historical generation, keys, schema, position, and reconciliation evidence. A business timestamp alone does not satisfy that contract, because a change arriving today can carry an earlier business date.

Lakeflow Connect provides managed ingestion; our manifest is a validation proposal for a process owned by the team. It is not an undocumented connector parameter. The integrated CDC documentation states:

On the first run or a full refresh, it captures an initial snapshot.

That sentence from the integrated architecture bounds the promise: reusing a historical file in this laboratory does not switch off the documented service snapshot.

What a cut has to answer. Six fields settle almost every later argument: which table, which generation of that table, which keys identify the row, which schema was in force, which position closes the base, and which evidence proves the reconciliation. Miss one and the boundary becomes a verbal agreement. Five of them describe the past and only one — the position — points forward; that is why a cut discussed purely in terms of “where to resume” always leaves a hole behind it.

A contract is not configuration. The manifest describes what the team commits to having verified; it switches nothing on and parameterizes nothing in the service. The connector keeps its documented behavior; the contract is the proof that the base handed to it is what the team says it is.

The problem it solves

The problem is not just duplication. There are three distinct failures: history without lineage, an interval without coverage, and a transformation that changes row semantics. Counts alone resolve none of them. Two tables can have the same record count and total while distributing values across different keys.

An overlapping window helps test the boundary. It does not authorize applying operations already incorporated into the base. A repeated deletion might silently pass in a permissive implementation; a repeated insert might duplicate the key. The rule must distinguish identical repetition from conflict and separate captured evidence from applied changes.

The three failures have different owners. History without lineage belongs to whoever produced the base: nobody can say which operation got in. An interval without coverage belongs to whoever runs the capture: the evidence expired, the process stopped, or retention was shorter than the window. A transformation that changes row semantics belongs to whoever writes the pipeline: the key started meaning something else between source and destination. Merging all three into a single “divergence” report guarantees that none of them gets fixed.

The cost of not separating them shows up in the investigation, not in the load. When the destination diverges two months later and there is no declared cut, reprocessing everything is the only safe option — and that is exactly the backfill you wanted to avoid. With the boundary written down, the question narrows: is the divergence before or after the contracted position?

Historical data and the overlap window converge in key-based reconciliation, which seals or blocks the cut.
Figure: A connector checkpoint does not substitute for a proven boundary.

Acceptance criterion. Pin the last event covered by the baseline and the first to apply, with the same source, capture epoch, and schema rules. Use overlap for testing, not as two applicable copies. If an expected delete is missing or the schema cannot be reconciled, retain the prior baseline and reassess a supported connector path.

How it works — step by step

  1. Identify the table generation. Record an epoch identifier, keys, and base schema. A recreated table does not automatically inherit continuity from its predecessor. Treat rebuild, restore and source swap as distinct epoch events: all three produce a table with the same name and a different history, and only the epoch identifier separates the cases.
  2. Declare the inclusive boundary. Specify which changes history contains and the first required position. Do not mix business time, SQL position, and Delta version. Write the boundary as an interval closed on one side only — through 103 inclusive, from 104 onward — because ambiguity over a single record is enough to duplicate or lose a key.
  3. Capture a verifiable overlap. Compare window events against historical lineage. Remove only content-identical duplicates; block conflicting events at the same position. Size the window by the source’s real retention, not by schedule comfort: an overlap wider than the available evidence produces no proof at all, it only postpones the conversation.
  4. Validate schema and coverage. Require evidence for the entire contracted interval, including changes whose resulting row no longer exists. Approving a new column requires an explicit adapter. Coverage is a test over the interval, not over the result: a row deleted and never seen again must appear as an observed operation even though it leaves no surviving record in the table.
  5. Reconcile by key and seal the manifest. Compare an independent reconstruction with the historical base and incremental result. Only then persist the contract and its SHA-256. Key-ordered reconciliation is the only point in the procedure where content is compared against content; everything before it merely prepares the ground so that comparison means something.

These steps are causal. A base hash does not prove its provenance; a hash protects an artifact only after you define and verify what it represents. In production, the team must also decide who can attest each component and how evidence will be collected. Skipping the order speeds nothing up: a manifest sealed before reconciliation protects a number nobody checked.

Standard CDC and integrated CDC are different designs

The standard CDC architecture uses a continuously running ingestion gateway and a separate ingestion pipeline. The gateway extracts snapshot and changes into a staging volume; the pipeline applies that content to the destination. The ingestion reference uses ingestion_gateway_id. The standard documentation warns that stopping the gateway can let changes expire and require full refresh.

With integrated CDC, extraction and application belong to the same update. Configuration references a Unity Catalog connection through connection_name, with connector_type: CDC. Staging still exists: it can be configured through data_staging_options or created automatically. Do not interpret “one pipeline” as “no staging” or “no retention.”

Integrated mode is triggered by default; its specific document says creation is through API, CLI, notebook, or bundle, not the UI. It requires feature enablement in the workspace, access to the primary instance, and connectivity for the chosen compute. Integrated continuous mode is described as Beta. None of these capabilities was enabled in this package.

There is also a difference between change tracking and CDC. The source setup documentation recommends change tracking for tables with primary keys and states that it takes precedence when both mechanisms are enabled. Change tracking records that a row changed, not every historical operation. SCD Type 2 in the integrated design requires CDC; do not assume every incremental source delivers a complete event archive.

Why the difference matters for the cut. In the standard design, staging is a visible artifact with its own retention, and the gateway can be stopped: there are three places where continuity can break and three possible owners for the incident. In the integrated design, extraction and application share the same update, which reduces breaking points and also reduces intermediate visibility — when the window fails, less artifact is left to inspect. Neither design removes the need for a declared boundary; they change where you will look for the evidence when it is demanded.

What does not change between them. In both, the first run starts from a documented snapshot, source retention limits what can be recovered, and full refresh is an operation with consequences of its own. Choosing the architecture changes topology, identity and operational limits; it does not change the fact that the external history your team loaded remains your team’s responsibility.

Use case: reusing an ERP history before switching on incremental ingestion

Illustrative scenario. The sequence, timings, and outcomes are not customer measurements.

A team has to move ingestion of three SQL Server ERP tables to Lakeflow Connect, with a cutover window of a single weekend and eighteen months of history already consolidated. The request arrives as a single sentence: “the history is ready, just start from last month”. The manifest turns that into a declared boundary, a verified overlap and a list of what was not proven.

The scope of the request matters more than it seems. “The history is ready” usually means three tables with very different volumes, eighteen months that include manual corrections nobody recorded, and a monthly export someone started treating as part of the base. The ingestion team will not ask about the architecture: they will ask, table by table, through which position the base answers and who signs that statement.

The five weeks before the cutover weekend. In the first, the work is inventory and touches no pipeline at all. The team lists the three tables, declares each one’s generation and meets the first discomfort: one of them was rebuilt seven months ago during a performance fix and nobody wrote down the date. That table enters the manifest with an unknown epoch, not a presumed one.

The second week brings overlap capture, and with it the first list of honest pending items: source retention is shorter than the team assumed, and part of the desired window simply has no available evidence. None of those pending items becomes a conclusion; they become tasks with a declared method and a deadline.

The third and fourth weeks start key-level reconciliation, and that is when the opening sentence falls apart. Two tables match; the third shows the same count and the same total with values spread across different keys. The finding costs almost nothing that week — it would have cost a full reprocessing had it appeared after the cutover.

In the fifth week the manifest is sealed and the rollback is written, so that the weekend only executes a decision already made. The deliverable is not a green panel: it is the contract with the inclusive boundary, the replay interval and the divergences found.

Reference architecture. Four blocks with distinct owners, deliberately decoupled:

  1. History producer. The process that builds the base and records table epoch, keys, schema and the last incorporated position. It does not decide what gets reprocessed and does not write to the destination. The decoupling is the point: a producer that also decides the replay erases the difference between what was consolidated and what will be reapplied, and the manifest loses the ability to show divergence between the two views.
  2. Overlap capture. A collector that stores window events in append-only storage with table_epoch, position, op, payload_hash and captured_at_utc. It records evidence; it applies no change. Append-only is not fussiness: it is what lets you answer “since when has this position been covered” without relying on the memory of whoever ran the collection, and what stops a reprocessing from rewriting its own proof.
  3. Cut validator. It reconciles by key, compares schemas and seals the manifest with the inclusive boundary and the replay interval. It blocks divergence; it neither fixes data nor normalizes schema on its own. Blocking instead of fixing is deliberate: a validator that normalizes schema by itself starts producing the data it was supposed to audit, and the divergence disappears from the report instead of being resolved.
  4. Cutover operation. An executor with its own identity, window and rollback, receiving a sealed manifest instead of producing one and recording the destination’s previous state. Receiving the manifest instead of producing it is what makes rollback possible: the previous state only means something when a declared boundary exists to compare it against.

A minimal matrix, with four events from the same captured window, already shows why the single sentence does not work:

Position Operation State in the base Decision Reason
102 Update of key 2 Already incorporated Outside replay Content identical to history, hash matches
103 Delete of key 1 Already incorporated Outside replay The inclusive boundary ends exactly here
104 Update of key 3 Missing from the base Applied Business date before the cut, position after it
106 Insert of key 4 Missing from the base Applied First occurrence of the key in checked lineage

The four rows come from the same window and reach different conclusions. No business-date filter can represent that: position 104 would be discarded for carrying a date earlier than the cut, and it is precisely the one that must get in. The column that decides is the position; the column that protects is the reason, because it is what lets you revisit the decision months later without reopening the capture.

Where the design usually fails. Five traps repeat:

  • Counting instead of reconciling. Base and reconstruction show the same count and the same total with values spread across different keys; compare hashes over key-ordered rows.
  • Overlap mistaken for replay permission. The whole window is reapplied as if every operation were idempotent; accept only identical-content duplicates and block conflicts at the same position.
  • Epoch forgotten after a table rebuild. A restore inherits the previous watermark and continuity becomes false; tie the contract to table_epoch and reopen validation when it changes.
  • Retention mistaken for coverage. The configuration says thirty days and the team starts treating thirty days as queryable evidence; validate the boundary through authorized observation and record in the manifest the interval that actually answered.
  • Transformation applied before the proof. The reconstruction arrives already normalized, with converted types and filled nulls, and is compared against the original base; reconcile in the source’s shape and leave normalization for after acceptance.

The previous attempt and why it did not hold. This team’s first design was a business-date filter: anything dated after the cut would be reprocessed and the rest would come from history. It passed the technical review and failed the first accounting check, which did not ask about dates — it asked why an entry corrected on the 12th was missing from the destination. The correction at position 104 carried a business date earlier than the cut and a position later than it; the filter dropped it with no error, no log and no count divergence. The fix was not technical: it was accepting that the unit of continuity is the capture position, and that business date is row data, not a certificate of order.

How to adapt it for a smaller context. Not every team needs the four blocks separated. With one table and a few tens of thousands of rows, the producer can be a documented script and the overlap store a versioned file — as long as three properties hold: the evidence still records position and content hash, history is not overwritten, and approval still requires key-level reconciliation. What does not scale down is simplifying the evidence model: a small cut approved by counting has the same defect as a large one.

What the operation receives. Not a verbal approval, but the sealed contract with the boundary, the overlap evidence, the divergences found and whatever remains unproven. A cut rejected on Friday costs less than a full refresh discovered on Monday. There is a useful side effect too: the same manifest becomes the starting point for later recovery, because the mapping between the source cut and the destination version is already written and attested.

When volume grows: what changes in the cut

With three tables, the manifest fits in the head of whoever wrote it. With two hundred, it stops being a document and becomes a system — and decisions that looked like details in the pilot start to determine whether the migration holds.

What grows is not the number of tables. It grows with the product of tables, generations and windows open at the same time. A source with two hundred tables migrating in waves has, at any moment, dozens of cuts in different states: some sealed, some in reconciliation, some invalidated by a rebuild. The wrong reaction is to standardize one cut for all of them, because retention and change frequency are not equal across tables. The right reaction is to group tables by change profile and give each group its own window.

Overlap must be declared, not improvised. At scale, capturing a wide window for every table exhausts source retention before reconciliation finishes. What works is splitting the inventory into two populations: critical tables, which get full overlap and key-level reconciliation in every cut, and the rest, which enter with minimal overlap and rotating-sample reconciliation of declared coverage. The difference between that and “we validated what we had time for” is that the first records the selection rule inside the manifest itself, and can therefore say which fraction of the source was checked in each wave.

Change becomes a trigger, it does not wait for the calendar. Past a certain size, revalidating on a schedule always arrives late. Three events should reopen a cut regardless of the agenda: rebuild or restore of the source table, a schema change beyond the approved nullable addition, and any interruption of the capture process. None of the three is rare, and all three invalidate a previous boundary without changing count or total.

Pending items need an age, or they become scenery. With three tables, two pending items are irritating. With two hundred, sixty pending items stop being read. The way out is to give pending items an age and treat age as severity: a table pending for two cuts means the evidence does not exist or nobody owns the source. Both are organizational problems, and neither is solved by running the capture again.

The real cost shows up in reconciliation, not in capture. Collecting events is the cheap, parallelizable part. The bottleneck is key-ordered comparison, which grows with the table’s cardinality and the schema’s width, not with the number of tables. That is why the sampling decision has to come before the wave: one table with a hundred million keys reconciled in full defines the migration calendar by itself.

Technical implementation: a manifest that actually fails

The laboratory uses a base at local sequence 100 and consolidated history through 103. The captured window covers 102–106, with two overlapping positions and one identical duplicate. These are invented dense integers, not SQL Server LSNs. In a real system, you do not validate an LSN interval by searching for every integer between two numbers.

History contains three keys and a total of 85. After the cut, there is an update with a late business date, a nullable addition of segment, and a deletion. Reconstruction ends with keys 3 and 4, two records, and a total of 80. Those numbers are fixture results, not customer metrics or an estimated backfill saving.

The tested schema guard rejects removal, changed types, or changed nullability before accepting the declared nullable addition:

def check_transition(old, new):
    require(set(old).issubset(new), "Non-additive schema change")
    require(all(new[k] == v for k, v in old.items()), "Unapproved type or nullability change")
    require(all(v["nullable"] for k, v in new.items() if k not in old), "New column needs a default adapter")

Run these commands from the package directory:

python -B -m unittest -q test_study.py
python -B study.py --emit

The program orders changes by the contracted sequence, verifies lineage 101–106, compares the captured window with the complete local ledger, and reconstructs the base through 103. It then applies only 104–106. The late update at 104 remains; filtering with business_utc > cut_utc would lose it.

The relevant result is:

{
  "authorized_operations": 0,
  "contract_sha256": "974494a1ce29cbe6203970946901786cbc0ae57e797d54407c87e4cac2aa5d60",
  "cut_inclusive": 103,
  "dry_run": true,
  "exact_duplicates_removed": 1,
  "final_reconciliation": {
    "amount_sum": 80,
    "row_count": 2,
    "rows_sha256": "d7fcbdd521b49d7c7f4a29747db228186810028e185aba2bcb0cbbccc4361297"
  },
  "late_business_events_kept": 1,
  "overlap_records_excluded": 2,
  "replay_window": [
    104,
    106
  ],
  "status": "PASS",
  "synthetic": true,
  "tenant_calls": 0
}

The cut-contract.json file preserves the cut snapshot, schemas and hashes, historical lineage, replay interval, and reconciled result. It also contains an attested synthetic mapping between the source cut and Bronze version 40. There is no implicit equality between a SQL sequence and a Delta version. Subsequent recovery uses that explicit association instead of conveniently recalculating a boundary.

Seven tests exercise the valid path and reject missing lineage, a discontinuous window, a conflicting duplicate, non-additive schema, different history with identical count and total, expired overlap, and an incorrect cut timestamp. The schema test accepts only nullable added columns; it does not pretend to reproduce automatic connector evolution.

What each rejection represents. Missing lineage is a base-production failure; a discontinuous window is a capture failure; a conflicting duplicate is an event-identity failure; non-additive schema is an architecture decision. Separating the four in the study’s output is deliberate: a generic FAIL would send them all to the same queue, when each one needs a different team, deadline and approval.

The most instructive fixture case is the different history with the same count and the same total. It exists to show that the cheap test passes and the correct test fails. In a real source, that divergence reappears months later as a “destination problem”, when it was born at the boundary.

Production practices

  • Separate historical reuse from native configuration. If a service does not document external bootstrap, treat the combination as another process requiring its own approval.
  • Keep a dedicated ingestion identity. SQL Server privileges vary by deployment. Permission to prepare CDC is not automatically the permission needed by a reader or monitor.
  • Confirm the full refresh policy. Standard documentation warns that it erases history when history tracking is enabled. A successful refresh can mean historical loss, not equivalent recovery.
  • Measure the actual retained interval. Configured retention does not prove every change remains queryable; validate the boundary and continuity through authorized observation.
  • Reconcile content, not just aggregates. Record hashes for schemas and key-ordered rows as well as counts and totals. A hash without stable normalization is not comparable.
  • Read documentation by architecture. The overview marks type changes unsupported and lists a maximum of 250 tables; the integrated page describes type widening and recommends a maximum of 300. Do not combine different pages into a global guarantee. Confirm behavior and limits for the contracted design before approving it.
  • Version the manifest per generation. Keep every cut as a new artifact with its own epoch and hash; overwriting the previous one erases the proof of which base supported which replay.
  • Reopen the cut by event. A rebuilt table, an altered schema or a stopped gateway invalidates the contract before the next ingestion cycle.
  • Declare observed retention, not configured retention. Record the interval that actually answered in the last authorized collection; that number, not the parameter, limits the overlap you can capture.
  • Give pending items an age. A table without evidence for two cuts is not a collection delay: it is a missing method or a missing owner, and it has to escalate as such.

Any backfill saving can only be measured afterward. The fixture proves that a short window reconstructs its known result; it does not estimate service load, duration, licensing, or cost. Network, runtime, source setup, consistent snapshots, and behavior under failure still lack platform validation.

Frequently asked questions (FAQ)

Can I hand my history to the connector and skip its snapshot?

That conclusion is not supported by the consulted pages. Integrated CDC documents an initial snapshot and full refresh. The laboratory validates a local contract, not an external-bootstrap interface. If your team really wants to reuse the base, treat the combination as a process of its own, with approval, evidence and an owner — not as a shortcut supported by the service.

Why overlap a window when the base is ready?

To compare the boundary with known evidence. Events through 103 are checked but not reapplied. Overlap without an identity rule simply replaces gap risk with duplication risk. The window exists to make the boundary observable: without it, the only proof that the base ends where someone said is that statement itself.

Is a business watermark enough?

No. Change 104 has a business date earlier than the cut and must be included. Use the documented capture order and keep business time as data, not as a continuity certificate. The symptom is treacherous because it produces no error: the count matches, the total matches, and the corrected row simply never arrives.

Can every schema change be normalized?

No. The fixture approves a specific nullable addition. Rename, drop, type changes, or nullability changes need another contract; the study blocks them before changing the result. Normalizing in silence is worse than blocking, because the architecture decision still gets made — only by a script, with no record and no owner.

Does SHA-256 authorize replay?

No. It detects alteration of the approved contract. Operational authorization and coverage evidence are separate decisions. No tenant operation is authorized or executed in this package. A correct hash over a badly built contract guarantees the document’s integrity, never the quality of what was documented.

Conclusion

A validated cut does not eliminate ingestion work. It makes the boundary something another operator can verify: a known base, covered changes, an explicit schema, and reproducible reconciliation. If any component is missing, the responsible response is to block or investigate further, not label the history “sufficient.” Reducing backfill is valid when continuity has been demonstrated, never when it has merely been assumed.

The side effect tends to be the same: the conversation with the business gets shorter, because it stops being about trust and starts being about positions. A pending item taken on, with a method and a deadline, resolves faster than a history declared “sufficient” by someone who will not answer for the difference.

Official references

Read in full on November 22, 2026:

👉 If you are assessing reused history with Lakeflow Connect, especially before accepting an incremental cut, make the boundary a verifiable contract. Want to discuss continuity and backfill? Reach me on LinkedIn.

Leave a Reply