databendlabs/databend · error
endpoint_url is required for storage oss
Error message
endpoint_url is required for storage oss
What it means
When parsing an Alibaba Cloud OSS URI location, Databend requires the endpoint_url connection option because OSS has no default endpoint in this code path. If CONNECTION options for an oss:// location lack endpoint_url, parse_oss_params throws this InvalidInput error.
Solutions
- Add ENDPOINT_URL to the CONNECTION options, e.g. CONNECTION=(ENDPOINT_URL='oss-cn-hangzhou.aliyuncs.com')
- Use the region-appropriate OSS endpoint from your Alibaba Cloud console
- If you meant S3, use an s3:// URL instead of oss://
Example fix
-- before CREATE STAGE s URL='oss://mybucket/path'; -- after CREATE STAGE s URL='oss://mybucket/path' CONNECTION=(ENDPOINT_URL='oss-cn-hangzhou.aliyuncs.com' ACCESS_KEY_ID='..' SECRET_ACCESS_KEY='..');
Defensive patterns
Strategy: validation
Validate before calling
if url.starts_with("oss://") && !opts.contains_key("endpoint_url") {
return Err("ENDPOINT_URL is required for oss:// locations".into());
} Try / catch
match err.kind() { ErrorKind::InvalidInput if msg.contains("endpoint_url is required") => /* prompt user for endpoint */, _ => return Err(err) } Prevention
- Always include ENDPOINT_URL for oss:// stages/connections
- Keep a per-provider connection template with endpoint pre-filled
- Pick the endpoint matching your bucket region
When it happens
Trigger: CREATE STAGE / CREATE CONNECTION with URL='oss://bucket/path' and no ENDPOINT_URL in the CONNECTION options.
Common situations: Assuming OSS locations work with bucket name alone; migrating an S3 stage definition to OSS and dropping the endpoint; forgetting the option in a templated DDL.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- endpoint_url is required for storage cos
- not implemented: Not implemented for storage type
- Unsupported storage type
- path in URL must end with '/
- {}
AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11).
Data as JSON: /api/errors/b69202188dca3506.
Report an issue: GitHub.
Appendix: source
Thrown at src/query/sql/src/planner/binder/location.rs:263
});
l.connection
.check()
.map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;
Ok(sp)
}
fn parse_oss_params(l: &mut UriLocation, root: String) -> Result<StorageParams> {
let endpoint = l
.connection
.get("endpoint_url")
.cloned()
.map(secure_omission)
.ok_or_else(|| {
Error::new(
ErrorKind::InvalidInput,
anyhow!("endpoint_url is required for storage oss"),
)
})?;
let sp = StorageParams::Oss(StorageOssConfig {
endpoint_url: endpoint,
presign_endpoint_url: "".to_string(),
bucket: l.name.to_string(),
access_key_id: l
.connection
.get("access_key_id")
.cloned()
.unwrap_or_default(),
access_key_secret: l
.connection
.get("access_key_secret")
.cloned()
.unwrap_or_default(),
root,
role_arn: l.connection.get("role_arn").cloned().unwrap_or_default(),View on GitHub (pinned to 288d84d76e)