AzureLocation
struct AzureLocationA parsed abfs(s):// or wasb(s):// location.
Implements Copyable, Movable
- Fields
account: Stringcontainer: Stringpath: String
objectstore.azureobjectstore.azure — Azure Blob Storage through SAS-token URLs.
Azure's own signing schemes are SharedKey (an HMAC-SHA256 over a canonical
form that is close to but not the same as SigV4) and Entra ID bearer tokens.
Neither is implemented. What is implemented is the SAS token: a query
string that already carries a signature someone else produced, which is what
Iceberg's adls.sas-token.<account> property holds and what a catalog vends.
With a SAS token, a blob is an HTTPS URL, and the whole backend is URL
construction plus two required headers.
Iceberg addresses ADLS Gen2 as abfss://container@account.dfs.core.windows.net/path.
The Blob endpoint (account.blob.core.windows.net) serves the same data with
the simpler API, so that is what this targets; wasbs:// names the Blob
endpoint directly and is accepted as well.
AzureLocationstruct AzureLocationA parsed abfs(s):// or wasb(s):// location.
Implements Copyable, Movable
account: Stringcontainer: Stringpath: StringAzureConfigstruct AzureConfigImplements Copyable, Movable
account: Stringsas_token: String: The query string of a SAS URL, with or without its leading ?.endpoint: String: Overrides the derived https://<account>.blob.core.windows.net, for Azurite or a sovereign cloud.__init__def __init__(out self) def __init__(out self, var account: String, var sas_token: String, var endpoint: String) from_propertiesdef from_properties(props: Dict[String, String], account: String = "") -> Self Reads Iceberg's adls.sas-token.<account> (and a plain adls.sas-token / azure.sas-token fallback).
base_urldef base_url(self) -> String url_fordef url_for(self, container: String, blob: String) -> String list_urldef list_url(self, container: String, prefix: String, marker: String) -> String headersdef headers(self) -> List[Header] write_headersdef write_headers(self) -> List[Header] BlobInfostruct BlobInfoImplements Copyable, Movable
name: Stringsize: IntAzureClientstruct AzureClientImplements Copyable, Movable
config: AzureConfighttp: HttpClient__init__def __init__(out self, var config: AzureConfig) def __init__(out self, var config: AzureConfig, var http: HttpClient) inputdef input(self, container: String, blob: String) -> HttpInputFile outputdef output(self, container: String, blob: String) -> HttpOutputFile delete_blobdef delete_blob(self, container: String, blob: String) list_blobsdef list_blobs(self, container: String, prefix: String = "") -> List[BlobInfo] Every blob under prefix, following NextMarker pages.
The response is <EnumerationResults><Blobs><Blob><Name>…, which the
same shallow XML reader handles as S3's ListBucketResult.
parse_azure_uridef parse_azure_uri(location: String) -> AzureLocation abfss://container@account.dfs.core.windows.net/a/b -> account account, container container, path a/b.
wasbs://container@account.blob.core.windows.net/a/b parses the same way.
A bare az://container/path is accepted with the account left empty, for
callers that configure the endpoint explicitly.
comptime BLOB_API_VERSION = String("2021-12-02")Sent as x-ms-version. Azure requires it on every request, and older services reject versions they do not know — this one is old enough to be universally supported and new enough for everything used here.