ahmedabu98 commented on code in PR #32529: URL: https://github.com/apache/beam/pull/32529#discussion_r1775149736
########## sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java: ########## @@ -257,6 +262,13 @@ public static Builder builder() { @Nullable public abstract ErrorHandling getErrorHandling(); + @SchemaFieldDescription( + "This option enables the use of BigQuery CDC functionality. It expects a Row schema" + + " wrapping the record to be inserted and adding the CDC info similar to:" + + " {cdc_info: {mutation_type:\"...\", change_sequence_number:\"...\"}, record: {...}}") + @Nullable + public abstract List<String> getUseCdcWritesWithPrimaryKey(); Review Comment: The only time user needs to specify a primary key is when they expect us to create the table (ie. [CREATE_IF_NEEDED](https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java#L3476-L3478)). If the table already exists, they should be able to use cdc writes without providing a primary key. Might be a good idea to decouple "use cdc writes" and "primary key" into two different options -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org