I am getting error when I was trying to partition the destination table in BigQuery while working with DataStream.
step by step to reproduce this:
- start DataStream from CloudSQL(MYSQL) to BigQuery
- once the Stream Completed all tables in BigQuery, pause the job
- Partition one of the table
- Resume the job
- Getting error log as below
====================================================
Discarded 97 unsupported events for BigQuery destination: 833537404433.Test_Membership_1.internal_Membership, with reason code: BIGQUERY_UNSUPPORTED_PRIMARY_KEY_CHANGE, details: Failed to write to BigQuery due to an unsupported primary key change: adding primary keys to existing tables is not supported..
{ insertId: "65ad79ec-0000-24c7-a66e-14223bbf970a@a1"
jsonPayload: {
context: "CDC"
event_code: "UNSUPPORTED_EVENTS_DISCARDED"
message: "Discarded 97 unsupported events for BigQuery destination:
833537404433.Test_Membership_1.internal_Membership, with reason code:
BIGQUERY_UNSUPPORTED_PRIMARY_KEY_CHANGE, details: Failed to write to
BigQuery due to an unsupported primary key change: adding primary keys to existing tables is not supported.."
read_method: ""
}
logName: "projects/gcp-everwash-wh-dw/logs/datastream.googleapis.com%2Fstream_activity"
receiveTimestamp: "2022-11-22T22:08:38.620495835Z"
resource: {2}
severity: "WARNING"
timestamp: "2022-11-22T22:08:37.726075Z"
}
What you expected to happen: ?
I am expecting to create Partition for the certain tables that are getting inserted in BigQuery via DataStream.