While working with gate conditions in Connect CDC, I ran into something that changed how I think about replication. A row is not tied to a single target. It can actually move between targets when a business value changes.
What this feature does
With gate conditions or horizontal partitioning, CDC can route rows to different targets based on column values.
Instead of:
- source change → update same row on target
It becomes:
- source change → send row to the right target based on business logic
What happens when the value changes
This is the part that stood out.
If the routing value changes, CDC does not just update the row. It can:
- remove the row from the old target
- insert it into the new target
So the row changes its destination as the business value changes.
Simple example
- LOCATION = EAST → row goes to East target
- LOCATION = WEST → row goes to West target
- LOCATION changes WEST → EAST → row is removed from West and inserted into East
That is not just replication. That is movement based on state.
Nuances that matter
There are a couple of behaviors that add more control:
- Option to keep the row in the old target even if it moves out of scope
- Default mapping for rows that do not match any gate condition
This makes the setup flexible depending on how strict the routing rules need to be.
What I learned in practice
Gate conditions are exact match and case sensitive.
If the incoming value does not match what is configured:
- the row is captured
- but it may not be sent to any target
This can look like data is “missing” when it is actually being filtered out.
What changed for me
I used to think of CDC as moving data between systems.
This made me see it differently.
It is not just transport. It is enforcing where data should live based on business state.
Takeaway
Connect CDC is not just answering “what changed”.
With gate conditions, it is also answering:
Where should this row belong now, based on its current values?
That shift in thinking makes a big difference when designing models.
Have you used gate conditions for routing, or run into cases where rows did not go to the expected target?