{"record":{"id":"c3a88070a9ee4e1e","repo":"risingwavelabs/risingwave","slug":"bigquery-local-path-and-bigquery-s3-path-set-a","errorCode":null,"errorMessage":"`bigquery.local.path` and `bigquery.s3.path` set at least one, configure as needed.","messagePattern":"`bigquery\\.local\\.path` and `bigquery\\.s3\\.path` set at least one, configure as needed\\.","errorType":"validation","errorClass":"SinkError::BigQuery","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/big_query.rs","lineNumber":248,"sourceCode":"\n        StorageWriterClient::new(credentials_file).await\n    }\n\n    async fn get_auth_json_from_path(&self, aws_auth_props: &AwsAuthProps) -> Result<String> {\n        if let Some(credentials) = &self.credentials {\n            Ok(credentials.clone())\n        } else if let Some(local_path) = &self.local_path {\n            std::fs::read_to_string(local_path)\n                .map_err(|err| SinkError::BigQuery(anyhow::anyhow!(err)))\n        } else if let Some(s3_path) = &self.s3_path {\n            let url =\n                Url::parse(s3_path).map_err(|err| SinkError::BigQuery(anyhow::anyhow!(err)))?;\n            let auth_vec = load_file_descriptor_from_s3(&url, aws_auth_props)\n                .await\n                .map_err(|err| SinkError::BigQuery(anyhow::anyhow!(err)))?;\n            Ok(String::from_utf8(auth_vec).map_err(|e| SinkError::BigQuery(e.into()))?)\n        } else {\n            Err(SinkError::BigQuery(anyhow::anyhow!(\n                \"`bigquery.local.path` and `bigquery.s3.path` set at least one, configure as needed.\"\n            )))\n        }\n    }\n}\n\n#[serde_as]\n#[derive(Clone, Debug, Deserialize, WithOptions)]\npub struct BigQueryConfig {\n    #[serde(flatten)]\n    pub common: BigQueryCommon,\n    #[serde(flatten)]\n    pub aws_auth_props: AwsAuthProps,\n    pub r#type: String, // accept \"append-only\" or \"upsert\"\n\n    #[serde(flatten)]\n    pub unknown_fields: std::collections::HashMap<String, String>,\n}","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/big_query.rs#L230-L266","documentation":"`get_auth_json_from_path` resolves the BigQuery service-account credentials JSON from one of three sources: inline `bigquery.credentials`, a local file path (`bigquery.local.path`), or an S3 path (`bigquery.s3.path`). If none of these properties is set, there is no way to authenticate and the sink throws this configuration error at sink creation time.","triggerScenarios":"Creating a BigQuery sink whose properties omit `bigquery.credentials`, `bigquery.local.path`, and `bigquery.s3.path` (or they are set to empty/null), so all three `if let Some(...)` branches fall through to the else.","commonSituations":"Users set the GCS/S3 path for data but forget the credential file location; users assume Workload Identity or environment-based auth is picked up automatically when the connector requires explicit credentials; properties renamed in a newer connector version.","solutions":["Set `bigquery.local.path` to the local path of the service-account JSON file (works when the file is accessible on the compute node)","Set `bigquery.s3.path` to an s3:// URL pointing at the credentials file (requires AWS auth props)","Alternatively set `bigquery.credentials` inline with the service-account JSON (it is enforced as a secret)","Re-create the sink after adding the property; it cannot be fixed at runtime"],"exampleFix":"// before\nWITH (\n  connector = 'bigquery',\n  type = 'append-only'\n)\n// after\nWITH (\n  connector = 'bigquery',\n  type = 'append-only',\n  bigquery.local.path = '/secrets/gcp_sa.json'\n)","handlingStrategy":"validation","validationCode":"let has_creds = props.contains_key(\"bigquery.credentials\")\n    || props.contains_key(\"bigquery.local.path\")\n    || props.contains_key(\"bigquery.s3.path\");\nassert!(has_creds, \"must set bigquery.credentials, bigquery.local.path, or bigquery.s3.path\");","typeGuard":null,"tryCatchPattern":"// Rust\nmatch BigQueryConfig::from_btreemap(props) {\n    Err(e) if e.to_string().contains(\"set at least one\") => {\n        return Err(anyhow!(\"configure bigquery.local.path or bigquery.s3.path before creating the sink\"));\n    }\n    other => other.map(|_| ()),\n}","preventionTips":["Always set bigquery.local.path or bigquery.s3.path alongside table/dataset props","Verify the credentials file exists and is readable before CREATE SINK","Prefer inline bigquery.credentials (enforced as secret) for cloud deployments"],"tags":["config","bigquery","authentication"],"backgroundTag":"missing-required-config-field","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"}