Skip to content

fix(load): propagate CDC load options to created table metadata (#7) - #13

Draft
expobrain wants to merge 1 commit into
stack/01-load-json-400from
stack/02-cdc-load-options
Draft

expobrain wants to merge 1 commit into
stack/01-load-json-400from
stack/02-cdc-load-options

Conversation

@expobrain

Copy link
Copy Markdown
Owner

What

A CDC landing load_table_from_file sends clustering and time-partitioning options along with the load job. uploadContentHandler.Handle created the destination table with only Schema and TableReference, dropping those options. This forwards clustering, timePartitioning and rangePartitioning to table insertion.

The 400 failure surface for this load shape is addressed by the previous rung (#6 / PR #12), which makes the small multipart upload return a terminal job status; this rung completes the load configuration handling by persisting the options on the table.

Changes

  • server/handler.go: destination table created by a load carries the job's clustering and partitioning configuration. The multipart/resumable upload path and the GCS import path both go through this handler, so both are covered.
  • server/server_test.go: TestCDCLoadOptionsAreApplied sends a Python-client-shaped CDC landing load with createDisposition, writeDisposition, decimalTargetTypes, schemaUpdateOptions, clustering, timePartitioning and asserts the table metadata.

Verification

  • go test ./server ./internal/... ./types — all green.

Stack

Rung 2, based on stack/01-load-json-400 (PR #12). Next: #8 (NUMERIC parameters).

Refs #7

Clustering and time/range partitioning from a load job were dropped when the destination table was created. This applies them to both the multipart/resumable upload path and the GCS import path, which share uploadContentHandler.Handle.

Refs #7
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