databendlabs/databend · error

URI protocol is not supported yet.

Error message

URI protocol {v} is not supported yet.

What it means

`parse_uri_location_resolved` matches the URI scheme against the set of storage schemes Databend supports (s3, gcs, oss, webhdfs, huggingface, etc.). Any other scheme falls into the catch-all arm and produces this `InvalidInput` error. It is the binder's way of refusing locations it cannot translate into `StorageParams`.

Solutions

  1. Change the URI scheme to a supported one (s3, gcs, oss, cos, obs, webhdfs, huggingface, etc.).
  2. Fix case/typo issues — the scheme match is exact, so use lowercase canonical schemes like `s3://`.
  3. For Azure or other unsupported backends, use an S3-compatible endpoint or a supported stage type instead.
  4. Check Databend docs/release notes for the list of supported LOCATION schemes in your version.

Example fix

// before
LOCATION = 'abfss://container@account.dfs.core.windows.net/path'
// after
LOCATION = 's3://bucket/path/' with an S3-compatible endpoint, or a supported stage backend
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED: &[&str] = &["s3","gcs","oss","cos","obs","webhdfs","huggingface"];
fn validate_scheme(url: &str) -> Result<(), String> {
    let scheme = url.split("://").next().unwrap_or("").to_lowercase();
    if SUPPORTED.contains(&scheme.as_str()) { Ok(()) } else { Err(format!("unsupported scheme: {}", scheme)) }
}

Prevention

When it happens

Trigger: Writing a LOCATION with a scheme not in the supported match list, e.g. `abfs://`, `file://`, `http://`, or a typo'd scheme like `s3a://bucket/path` when passed through `parse_uri_location`.

Common situations: Users copying connection strings from other systems (Azure `abfss://`, `az://`), typos in `s3` (`s3n`, `S3` case variants), or attempting local-disk locations which Databend doesn't accept as URI locations.

Understand the failure class

Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.

Related errors


AI-assisted analysis of databendlabs/databend@288d84d76e (2026-09-11). Data as JSON: /api/errors/d089d8bdd817bfd0. Report an issue: GitHub.

Appendix: source

Thrown at src/query/sql/src/planner/binder/location.rs:642

            check_storage_params_endpoints(&StorageParams::Http(cfg.clone()))
                .await
                .map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;
            return Ok((StorageParams::Http(cfg), "/".to_string()));
        }
        Scheme::Fs => {
            if root == "/" && path == STDIN_FD {
                StorageParams::Memory
            } else {
                let cfg = StorageFsConfig { root };
                StorageParams::Fs(cfg)
            }
        }
        Scheme::Webhdfs => parse_webhdfs_params(l, root)?,
        Scheme::Huggingface => parse_huggingface_params(l, root)?,
        v => {
            return Err(Error::new(
                ErrorKind::InvalidInput,
                anyhow!("URI protocol {v} is not supported yet."),
            ));
        }
    };

    // Validate every endpoint URL exposed by the resolved StorageParams
    // (including secondary URLs such as OSS presign_endpoint_url) against the
    // egress policy. Centralising the check here keeps each per-scheme parser
    // free of policy knowledge and ensures new fields cannot silently bypass
    // it.
    //
    // Run before sp.auto_detect(): the S3 auto-detect branch contacts the
    // configured endpoint to discover the bucket region, so the policy must
    // gate that call as well. auto_detect only mutates `region`, not the
    // endpoint URL, so a single pre-check is sufficient.
    check_storage_params_endpoints(&sp)
        .await
        .map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;

View on GitHub (pinned to 288d84d76e)