Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ impl MicrosoftAzureBuilder {
};

match parsed.scheme() {
"az" | "adl" | "azure" => self.container_name = Some(validate(host)?),
"abfs" | "abfss" => {
"adl" | "azure" => self.container_name = Some(validate(host)?),
"az" | "abfs" | "abfss" => {
Comment thread
ByteBaker marked this conversation as resolved.
// abfs(s) might refer to the fsspec convention abfs://<container>/<path>
// or the convention for the hadoop driver abfs[s]://<file_system>@<account_name>.dfs.core.windows.net/<path>
if parsed.username().is_empty() {
Expand Down Expand Up @@ -1103,6 +1103,14 @@ mod tests {
assert_eq!(builder.container_name, Some("file_system".to_string()));
assert!(!builder.use_fabric_endpoint.get().unwrap());

let mut builder = MicrosoftAzureBuilder::new();
builder
.parse_url("az://container@account.dfs.core.windows.net/path-part/file")
.unwrap();
assert_eq!(builder.account_name, Some("account".to_string()));
assert_eq!(builder.container_name, Some("container".to_string()));
assert!(!builder.use_fabric_endpoint.get().unwrap());

let mut builder = MicrosoftAzureBuilder::new();
builder
.parse_url("abfss://file_system@account.dfs.fabric.microsoft.com/")
Expand Down