Anish Mahto created SPARK-57134:
-----------------------------------
Summary: Implement SCD2 Batch Processor; Preprocess Microbatch
Key: SPARK-57134
URL: https://issues.apache.org/jira/browse/SPARK-57134
Project: Spark
Issue Type: Sub-task
Components: Declarative Pipelines
Affects Versions: 4.3.0
Reporter: Anish Mahto
{*}Preamble{*}:
The SCD type 2 flow is a foreachBatch streaming query on an input
change-data-feed, and is responsible for reconciling the incoming change data
onto some target table that follows SCD2 replication semantics.
SCD2 flows also maintain an "auxiliary" table to keep track of early-arriving
out-of-order received events state. Each microbatch will need to reconcile
against this auxiliary table as well, and update the auxiliary table's state
appropriately for future microbatches.
*Preprocess Microbatch*
For SCD2, preprocessing the microbatch is all about getting it in the right
shape, aligned with the shape of the target table the microbatch will be merged
into + the shape that SCD2 itself as a standard demands.
That is:
* The microbatch must have a start-at and end-at columns projected as per the
SCD2 standard, to indicate that a historical/alive record was active between
those sequence stamps
* The microbatch will have the operational CDC metadata column projected,
which is needed to reconcile late arriving events/bookkeeping
* As per the Spark AutoCDC API, the microbatch should project down to just the
user-specified column selection
Implement the part of the core SCD2 microbatch processor that does this
microbatch preprocessing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]