Skip to content

[SPARK-56882][SDP] Implement SCD1 Batch Processor; Target Column Projection#55991

Open
AnishMahto wants to merge 21 commits into
apache:masterfrom
AnishMahto:SPARK-56882-SCD1-project-target-columns-onto-microbatch
Open

[SPARK-56882][SDP] Implement SCD1 Batch Processor; Target Column Projection#55991
AnishMahto wants to merge 21 commits into
apache:masterfrom
AnishMahto:SPARK-56882-SCD1-project-target-columns-onto-microbatch

Conversation

@AnishMahto
Copy link
Copy Markdown
Contributor

Approved AutoCDC SPIP: https://lists.apache.org/thread/j6sj9wo9odgdpgzlxtvhoy7szs0jplf7


This is a stacked PR. Review incremental diff here: AnishMahto/spark@SPARK-56870-extend-microbatch-with-cdc-metadata...SPARK-56882-SCD1-project-target-columns-onto-microbatch


Preamble:

The SCD type 1 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 SCD1 replication semantics.

SCD1 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.

Target Column Projection:

As per the SPIP and ChangeArgs.columnSelection, users are allowed to specify the set of columns that actually gets persisted in the target table. Any columns not selected should be dropped before target table merge/persistence.

We should project only these selected columns onto the microbatch so that its dataframe is in the correct shape prior to CDC processing and merging into the target table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant