Skip to content

Commit eaa3f79

Browse files
djouallahclaude
andauthored
Add use_fabric_endpoint parameter to MicrosoftAzure class (#1357)
This change adds support for the use_fabric_endpoint parameter to the MicrosoftAzure object store class, enabling connections to Microsoft Fabric OneLake storage. The parameter allows users to specify that they want to use Data Lake Storage Gen2 endpoints (dfs.fabric.microsoft.com) instead of the default Azure Blob Storage endpoints (blob.core.windows.net), which is required for OneLake/Fabric storage access. Implementation follows the same pattern as existing boolean parameters (use_emulator, allow_http) by: - Adding the parameter to the PyO3 signature macro - Adding it as Option<bool> to the function parameters - Conditionally calling with_use_fabric_endpoint() on the builder Fixes #1356 Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 7aff363 commit eaa3f79

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/store.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub struct PyMicrosoftAzureContext {
7676
#[pymethods]
7777
impl PyMicrosoftAzureContext {
7878
#[allow(clippy::too_many_arguments)]
79-
#[pyo3(signature = (container_name, account=None, access_key=None, bearer_token=None, client_id=None, client_secret=None, tenant_id=None, sas_query_pairs=None, use_emulator=None, allow_http=None))]
79+
#[pyo3(signature = (container_name, account=None, access_key=None, bearer_token=None, client_id=None, client_secret=None, tenant_id=None, sas_query_pairs=None, use_emulator=None, allow_http=None, use_fabric_endpoint=None))]
8080
#[new]
8181
fn new(
8282
container_name: String,
@@ -89,6 +89,7 @@ impl PyMicrosoftAzureContext {
8989
sas_query_pairs: Option<Vec<(String, String)>>,
9090
use_emulator: Option<bool>,
9191
allow_http: Option<bool>,
92+
use_fabric_endpoint: Option<bool>,
9293
) -> Self {
9394
let mut builder = MicrosoftAzureBuilder::from_env().with_container_name(&container_name);
9495

@@ -127,6 +128,10 @@ impl PyMicrosoftAzureContext {
127128
builder = builder.with_allow_http(allow_http);
128129
}
129130

131+
if let Some(use_fabric_endpoint) = use_fabric_endpoint {
132+
builder = builder.with_use_fabric_endpoint(use_fabric_endpoint);
133+
}
134+
130135
Self {
131136
inner: Arc::new(
132137
builder

0 commit comments

Comments
 (0)