{"record":{"id":"d089d8bdd817bfd0","repo":"databendlabs/databend","slug":"uri-protocol-v-is-not-supported-yet","errorCode":null,"errorMessage":"URI protocol {v} is not supported yet.","messagePattern":"URI protocol (.+?) is not supported yet\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/query/sql/src/planner/binder/location.rs","lineNumber":642,"sourceCode":"            check_storage_params_endpoints(&StorageParams::Http(cfg.clone()))\n                .await\n                .map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;\n            return Ok((StorageParams::Http(cfg), \"/\".to_string()));\n        }\n        Scheme::Fs => {\n            if root == \"/\" && path == STDIN_FD {\n                StorageParams::Memory\n            } else {\n                let cfg = StorageFsConfig { root };\n                StorageParams::Fs(cfg)\n            }\n        }\n        Scheme::Webhdfs => parse_webhdfs_params(l, root)?,\n        Scheme::Huggingface => parse_huggingface_params(l, root)?,\n        v => {\n            return Err(Error::new(\n                ErrorKind::InvalidInput,\n                anyhow!(\"URI protocol {v} is not supported yet.\"),\n            ));\n        }\n    };\n\n    // Validate every endpoint URL exposed by the resolved StorageParams\n    // (including secondary URLs such as OSS presign_endpoint_url) against the\n    // egress policy. Centralising the check here keeps each per-scheme parser\n    // free of policy knowledge and ensures new fields cannot silently bypass\n    // it.\n    //\n    // Run before sp.auto_detect(): the S3 auto-detect branch contacts the\n    // configured endpoint to discover the bucket region, so the policy must\n    // gate that call as well. auto_detect only mutates `region`, not the\n    // endpoint URL, so a single pre-check is sufficient.\n    check_storage_params_endpoints(&sp)\n        .await\n        .map_err(|err| Error::new(ErrorKind::InvalidInput, err.to_string()))?;\n","sourceCodeStart":624,"sourceCodeEnd":660,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/query/sql/src/planner/binder/location.rs#L624-L660","documentation":"`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`.","triggerScenarios":"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`.","commonSituations":"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.","solutions":["Change the URI scheme to a supported one (s3, gcs, oss, cos, obs, webhdfs, huggingface, etc.).","Fix case/typo issues — the scheme match is exact, so use lowercase canonical schemes like `s3://`.","For Azure or other unsupported backends, use an S3-compatible endpoint or a supported stage type instead.","Check Databend docs/release notes for the list of supported LOCATION schemes in your version."],"exampleFix":"// before\nLOCATION = 'abfss://container@account.dfs.core.windows.net/path'\n// after\nLOCATION = 's3://bucket/path/' with an S3-compatible endpoint, or a supported stage backend","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\"s3\",\"gcs\",\"oss\",\"cos\",\"obs\",\"webhdfs\",\"huggingface\"];\nfn validate_scheme(url: &str) -> Result<(), String> {\n    let scheme = url.split(\"://\").next().unwrap_or(\"\").to_lowercase();\n    if SUPPORTED.contains(&scheme.as_str()) { Ok(()) } else { Err(format!(\"unsupported scheme: {}\", scheme)) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only documented LOCATION schemes","Lowercase schemes; the match is exact","Check release docs when upgrading — supported schemes can grow"],"tags":["uri","storage","unsupported-scheme"],"backgroundTag":"invalid-url-format","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}