https://delta.io logo
k

krishna prasad

09/03/2023, 6:04 AM
Hello There, I'm trying to use the delta-rs to read a delta table (created via Databrics) form an ADLS path with and AzureAD-Service Principle (with clientID, and ClientSecret) The path looks like "abfss://something@aasfa.dfs.core.windows.net/aa/bb/tbl" I'm trying to use the
delta::open_table_with_storage_options(table_path, storage_options)
function and the options that I'm trying to use are
fn get_storage_options(client_id:String, client_secret:String, tenant_id:String) -> HashMap<String, String> {
let mut storage_options: HashMap<String, String> = HashMap::new();
storage_options.insert("azure_client_id".to_string(), client_id);
storage_options.insert("azure_client_secret".to_string(), client_secret);
storage_options.insert("azure_tenant_id".to_string(), tenant_id);
storage_options
}
I get this error Error: MissingFeature { feature: "azure", url: "abfss://something@aasfa.dfs.core.windows.net/aa/bb/tbl" } On following up I see that the code ends up here https://github.com/delta-io/delta-rs/blob/787c13a63efa9ada96d303c10c093424215aaa80/rust/src/storage/config.rs#L190C1-L198C2
fn try_configure_azure(
storage_url: &Url,
_options: &StorageOptions,
) -> DeltaResult<Arc<DynObjectStore>> {
Err(DeltaTableError::MissingFeature {
feature: "azure",
url: <http://storage_url.as|storage_url.as>_ref().into(),
})
}
I was under the impression that reding from ADLS is supported in delta-rs, is this wrong or am I doing something wrong? Any help is appriciated.
I found the answer , I had to explicity add the feature in cargo.toml
deltalake = { version = "0.14.0", features = ["azure"]}
👍 1