{"record":{"id":"bc45efda6ab8fd91","repo":"risingwavelabs/risingwave","slug":"bigquery-insert-error","errorCode":null,"errorMessage":"bigquery insert error {:?}","messagePattern":"bigquery insert error (.+?)","errorType":"exception","errorClass":"SinkError::BigQuery","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/big_query.rs","lineNumber":839,"sourceCode":"            Status,\n        >,\n    >\n    + 'static\n    + Send,\n) {\n    let mut resp_stream = resp_stream\n        .await\n        .map_err(|e| SinkError::BigQuery(e.into()))?\n        .into_inner();\n    loop {\n        match resp_stream\n            .message()\n            .await\n            .map_err(|e| SinkError::BigQuery(e.into()))?\n        {\n            Some(append_rows_response) => {\n                if !append_rows_response.row_errors.is_empty() {\n                    return Err(SinkError::BigQuery(anyhow::anyhow!(\n                        \"bigquery insert error {:?}\",\n                        append_rows_response.row_errors\n                    )));\n                }\n                if let Some(google_cloud_googleapis::cloud::bigquery::storage::v1::append_rows_response::Response::Error(status)) = append_rows_response.response{\n                            return Err(SinkError::BigQuery(anyhow::anyhow!(\n                                \"bigquery insert error {:?}\",\n                                status\n                            )));\n                        }\n                yield ();\n            }\n            None => {\n                return Err(SinkError::BigQuery(anyhow::anyhow!(\n                    \"bigquery insert error: end of resp stream\",\n                )));\n            }\n        }","sourceCodeStart":821,"sourceCodeEnd":857,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/big_query.rs#L821-L857","documentation":"After writing rows through the BigQuery Storage Write API, the AppendRows response is inspected: if it carries per-row errors (append_rows_response.row_errors is non-empty), this error surfaces them. It means BigQuery rejected some or all rows in the batch, e.g. due to schema mismatch or invalid row data.","triggerScenarios":"resp_to_stream processing an append_rows_response whose row_errors vector is non-empty - rows in the submitted protobuf batch failed validation against the BigQuery table schema.","commonSituations":"Sink schema drifted from the remote BigQuery table (missing/renamed columns, wrong types); NULL values in required fields; table recreated with a different schema than the one validated at sink creation.","solutions":["Compare the sink schema with the remote table: query INFORMATION_SCHEMA.COLUMNS and align columns/types.","Drop and recreate the sink (and optionally the table with auto_create=true) so the protobuf schema matches the current table schema.","Inspect row_errors details (index + message) in the log to identify the offending row's field.","Check required-field constraints; adjust source data or make columns nullable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"-- Keep the sink schema and remote table schema aligned;\n-- verify before creating the sink:\nSELECT column_name, data_type\nFROM `<project>.<dataset>.INFORMATION_SCHEMA.COLUMNS`\nWHERE table_name = '<table>' ORDER BY ordinal_position;","typeGuard":null,"tryCatchPattern":"match sink_write_result {\n    Err(SinkError::BigQuery(e)) if e.to_string().contains(\"bigquery insert error\") => {\n        // parse row_errors from the message, fix schema/data, recreate sink if needed\n    }\n    other => other?,\n}","preventionTips":["Use auto_create=true so RisingWave always controls the table schema.","Avoid altering the remote table schema externally after sink creation.","Make remote columns nullable where the source can emit NULL.","Keep rows below BigQuery's size limits and required fields populated."],"tags":["bigquery","storage-write-api","schema-mismatch","network"],"backgroundTag":"api-error-response","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}