Skip to content

initial autocdc type1 docs#57149

Draft
suhuruli wants to merge 1 commit into
apache:masterfrom
suhuruli:suhuruli/sdp-cdc-programming-guide
Draft

initial autocdc type1 docs#57149
suhuruli wants to merge 1 commit into
apache:masterfrom
suhuruli:suhuruli/sdp-cdc-programming-guide

Conversation

@suhuruli

@suhuruli suhuruli commented Jul 9, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

This PR documents Auto CDC (Change Data Capture) support for Spark Declarative Pipelines (SDP) in the programming guide.

It adds a new section, "Change Data Capture (CDC) with Auto CDC," to docs/declarative-pipelines-programming-guide.md, placed after the SQL programming section and before "Writing Data to External Targets with Sinks." The section covers:

  • Concept - what Auto CDC does, its SCD Type 1 semantics (keep only the current version of each row), and how it handles inserts, updates, deletes, and out-of-order/duplicate events, with a worked before/after example.
  • Requirements - the target must be a pre-created streaming table, the source must be a streaming source, and keys plus a sequencing expression are required.
  • Python API reference - the create_auto_cdc_flow function with a full parameter table.
  • SQL reference - both supported syntax forms (CREATE FLOW ... AS AUTO CDC INTO and CREATE STREAMING TABLE ... FLOW AUTO CDC), including required clause ordering.
  • End-to-end quickstart - a spark-pipelines init -> run walkthrough.
  • How-tos - handling deletes, selecting columns, out-of-order events, composite keys, and changing the key set (full refresh).
  • Limitations/considerations - SCD Type 1 only, streaming-table target only, immutable key set, and table-format requirements.

No functional code is changed; this is documentation only.

Why are the changes needed?

AutoCDC Type 1 recently merged into 4.2, this adds prog guide.

Does this PR introduce any user-facing change?

Yes, but documentation only. It adds a new section to the Spark Declarative Pipelines programming guide. There is no change to behavior, APIs, or output.

How was this patch tested?

No tests were added; this is a documentation-only change. The Markdown was verified locally to ensure it is ASCII-only (per the repository convention) and that the internal anchor link (#spark-pipelines-run) resolves to an existing heading. All code snippets and API parameters were cross-checked against the current implementation (create_auto_cdc_flow, the autoCdcCommand SQL grammar, and the pipelines.proto definitions).

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

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