{"record":{"id":"8e468879a4f2054e","repo":"risingwavelabs/risingwave","slug":"e","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"validation","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/file_sink/opendal_sink.rs","lineNumber":171,"sourceCode":"            return Err(SinkError::Config(anyhow!(\n                \"File sink only supports append-only mode at present. \\\n                    Please change the query to append-only, and specify it \\\n                    explicitly after the `FORMAT ... ENCODE ...` statement. \\\n                    For example, `FORMAT xxx ENCODE xxx(force_append_only='true')`\"\n            )));\n        }\n\n        if self.format_desc.encode != SinkEncode::Parquet\n            && self.format_desc.encode != SinkEncode::Json\n        {\n            return Err(SinkError::Config(anyhow!(\n                \"File sink only supports `PARQUET` and `JSON` encode at present.\"\n            )));\n        }\n\n        match self.op.list(&self.path).await {\n            Ok(_) => Ok(()),\n            Err(e) => Err(anyhow!(e).into()),\n        }\n    }\n\n    async fn new_log_sinker(\n        &self,\n        writer_param: crate::sink::SinkWriterParam,\n    ) -> Result<Self::LogSinker> {\n        let writer = OpenDalSinkWriter::new(\n            self.op.clone(),\n            &self.path,\n            self.schema.clone(),\n            writer_param.executor_id,\n            &self.format_desc,\n            self.engine_type.clone(),\n            self.batching_strategy.clone(),\n        )?;\n        Ok(BatchingLogSinker::new(writer))\n    }","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/file_sink/opendal_sink.rs#L153-L189","documentation":"During sink validation, the connector runs `op.list(&self.path)` against the object store (via OpenDAL) to prove the configured path/location is reachable and credentials work. Any error returned by the storage backend (auth failure, missing bucket, bad endpoint) is wrapped with `anyhow!` into a generic SinkError and surfaced to the user as-is.","triggerScenarios":"Calling `CREATE SINK ... WITH (connector='file_s3'|..., path=...)` where the OpenDAL operator cannot list the target path: wrong bucket/container name, missing or invalid credentials, unreachable endpoint, or nonexistent prefix on some backends.","commonSituations":"Typo'd S3 bucket or path, AWS credentials absent/wrong region, HDFS/WebHDFS NameNode down, local FS path without permission, or firewalled network blocking the object store.","solutions":["Verify the `path`/`location` option points to an existing, accessible prefix in the configured backend","Check the backend connection options (bucket, endpoint, region, root) in the sink WITH clause","Confirm credentials (env vars or sink options) are valid and have ListObject permission on the path","Test reachability of the storage endpoint from the RisingWave node (network/firewall/DNS)"],"exampleFix":"// before\nWITH (connector = 'file_s3', path = 's3://my-buket/output/')\n// after\nWITH (connector = 'file_s3', path = 's3://my-bucket/output/', aws.region = 'us-east-1')","handlingStrategy":"validation","validationCode":"// Before CREATE SINK, verify the object store path is listable with the same credentials\nimport boto3\ns3 = boto3.client('s3')\nresp = s3.list_objects_v2(Bucket='my-bucket', Prefix='output/', MaxKeys=1)\nassert 'Key' in resp or resp['KeyCount'] >= 0  # raises if bucket/creds/network are bad","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-create and test the sink path with the same credentials used by RisingWave","Pin region/endpoint explicitly in the WITH options","Grant the principal ListBucket permission on the path","Check object-store connectivity from the cluster before creating sinks"],"tags":["object-storage","opendal","sink-validation","config"],"backgroundTag":"resource-not-found","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"}