{"record":{"id":"6ccb8a9b145e665d","repo":"risingwavelabs/risingwave","slug":"url-parse-error-for-gcs-deltalake-location-wrappe","errorCode":null,"errorMessage":"Url parse error for GCS deltalake location (wrapped error)","messagePattern":"Url parse error for GCS deltalake location \\(wrapped error\\)","errorType":"exception","errorClass":"SinkError::DeltaLake","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/deltalake.rs","lineNumber":122,"sourceCode":"                deltalake::open_table_with_storage_options(url, storage_options).await?\n            }\n            DeltaTableUrl::Local(local_path) => {\n                let url = Url::parse(&format!(\"file://{}\", local_path))\n                    .map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table(url).await?\n            }\n            DeltaTableUrl::Gcs(gcs_path) => {\n                let mut storage_options = HashMap::new();\n                storage_options.insert(\n                    GCS_SERVICE_ACCOUNT.to_owned(),\n                    self.gcs_service_account.clone().ok_or_else(|| {\n                        SinkError::Config(anyhow!(\n                            \"gcs.service.account is required with Google Cloud Storage (GCS)\"\n                        ))\n                    })?,\n                );\n                deltalake::gcp::register_handlers(None);\n                let url = Url::parse(&gcs_path).map_err(|e| SinkError::DeltaLake(anyhow!(e)))?;\n                deltalake::open_table_with_storage_options(url, storage_options).await?\n            }\n        };\n        Ok(table)\n    }\n\n    fn get_table_url(path: &str) -> Result<DeltaTableUrl> {\n        if path.starts_with(\"s3://\") || path.starts_with(\"s3a://\") {\n            Ok(DeltaTableUrl::S3(path.to_owned()))\n        } else if path.starts_with(\"gs://\") {\n            Ok(DeltaTableUrl::Gcs(path.to_owned()))\n        } else if let Some(path) = path.strip_prefix(\"file://\") {\n            Ok(DeltaTableUrl::Local(path.to_owned()))\n        } else {\n            Err(SinkError::DeltaLake(anyhow!(\n                \"path should start with 's3://','s3a://'(s3) ,gs://(gcs) or file://(local)\"\n            )))\n        }","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/deltalake.rs#L104-L140","documentation":"Error in create_deltalake_client when constructing the GCS deltalake table URL: the local/GCS path could not be parsed into a valid Url (the wrapped underlying parse error carries the cause). It indicates the configured deltalake location string is malformed (bad characters, missing scheme handling) rather than a connectivity problem.","triggerScenarios":"create_deltalake_client with DeltaTableUrl::Gcs whose gs:// path fails Url::parse — e.g. 'gs://bucket\\path', spaces, or control characters.","commonSituations":"Malformed bucket/object names; whitespace or newlines introduced when pasting the location; backslashes from Windows-style paths.","solutions":["Use a well-formed gs://bucket/path URL as the location.","Trim whitespace and replace backslashes with forward slashes.","Percent-encode any special characters in object keys."],"exampleFix":"// before\nLOCATION = 'gs://bucket/my table'\n// after\nLOCATION = 'gs://bucket/my-table'","handlingStrategy":"validation","validationCode":"let loc = location.trim();\nif !loc.starts_with(\"gs://\") {\n    return Err(\"GCS deltalake location must start with gs://\");\n}\nUrl::parse(loc).map_err(|e| format!(\"invalid GCS URL: {e}\"))?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use forward slashes and URL-safe characters in bucket/object names.","Trim pasted values to remove hidden whitespace or newlines."],"tags":["rust","deltalake","gcs","url"],"backgroundTag":"invalid-url-format","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"}