Skip to content

[SPARK-56651][CONNECT][SDP] Add Python APIs for Auto CDC SCD Type 1#56045

Open
anew wants to merge 2 commits into
apache:masterfrom
anew:autocdc-python-api
Open

[SPARK-56651][CONNECT][SDP] Add Python APIs for Auto CDC SCD Type 1#56045
anew wants to merge 2 commits into
apache:masterfrom
anew:autocdc-python-api

Conversation

@anew
Copy link
Copy Markdown
Contributor

@anew anew commented May 21, 2026

What changes were proposed in this pull request?

Adds create_auto_cdc_flow to the the SDP Python API. For now, this will only support SCD Type 1. Parameters:

  • name: the name of the flow
  • target: the target table
  • source: the source dataset with the change events
  • keys: the unique key per row,
  • sequence_by: a sequence id to establish time order
  • apply_as_deletes: a boolean expression indicating whether an event represents a delete
  • apply_as_truncates: a boolean expression indicating whether an event represents a truncation
  • column_list: a list of columns to include in the target table
  • except_column_list: a list of columns to exclude from the target table
  • stored_as_scd_type the SCD type, must be 1
  • ignore_null_updates_column_list: a list of columns for which to ignore null values
  • ignore_null_updates_except_column_list: a list of columns for which not to ignore null values
  • source_code_location: the location in the Python source code that defines this flow

Why are the changes needed?

See the SPIP at https://docs.google.com/document/d/1Hp5BGEYJRHbk6J7XUph3bAPZKRQXKOuV1PEaqZMMRoQ/

Does this PR introduce any user-facing change?

Yes, it introduces a new method in the SDP Python API.

How was this patch tested?

Unit tests were added, using a local graph registry.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Sonnet 4.6

anew added 2 commits May 21, 2026 18:12
- Remove spaces around = in keyword arguments (PEP 8)
- Fix type hint: List[Union[str, Column]] -> Union[List[str], List[Column]]
- Reorder imports and collapse unnecessary line continuations

Co-authored-by: Isaac
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