Skip to main content
Version: 0.4 (Latest)

Microsoft Fabric OneLake

Exports Parquet files to OneLake via Service Principal authentication.

Configuration​

{
"onelake_01": {
"ds_type": "onelake",
"auth_mode": "service_principal",
"info": {
"directory": "onelake://your-workspace-name/your-lakehouse-name/",
"azure_client_id": "your-application-client-id",
"azure_tenant_id": "your-directory-tenant-id",
"azure_client_secret": "$env{LX_AZURE_CLIENT_SECRET}"
}
}
}
FieldRequiredDescription
ds_typeYesMust be "onelake"
auth_modeYesMust be "service_principal"
directoryYesonelake://workspace/lakehouse/path/
azure_client_idYesApplication (client) ID from Azure AD
azure_tenant_idYesDirectory (tenant) ID from Azure AD
azure_client_secretYesClient secret value from Azure AD app

URL Format​

onelake://workspace-name/lakehouse-name/path/to/exports/

Example:

onelake://FABRICPOC/lakexpress_lakehouse/exports/

Usage​

./LakeXpress config create -a credentials.json --lxdb_auth_id lxdb_mssql \
--source_db_auth_id source_postgres \
--target_storage_id onelake_01

With config creation:

python lxpress.py config create \
-a credentials.json \
--lxdb_auth_id lxdb_mssql \
--source_db_auth_id source_postgres \
--source_db_name tpch \
--source_schema_name tpch_1 \
--fastbcp_p 2 \
--n_jobs 4 \
--target_storage_id onelake_01 \
--generate_metadata
caution

--generate_metadata with a OneLake target is not fully reliable in the current release: schema discovery does not recognize onelake as its own storage type for metadata purposes, so it falls back to local-filesystem handling when building metadata paths. This can produce incorrect paths in the generated CDM metadata files. If you rely on --generate_metadata, verify the output paths carefully when the target storage is OneLake, or omit the flag until this is addressed.

Path Structure​

onelake://workspace/lakehouse/base_path/schema_name/table_name/part-00000.parquet

With --sub_path:

onelake://workspace/lakehouse/base_path/sub_path/schema_name/table_name/part-00000.parquet

Authentication Setup​

1. Create an Azure AD Application (Service Principal):

In Azure Portal App Registrations:

  • Click "New registration"
  • Note the Application (client) ID and Directory (tenant) ID
  • Go to "Certificates & secrets" -> "New client secret"
  • Copy the client secret value (shown only once)

2. Grant OneLake Access in Microsoft Fabric:

In the Fabric portal, go to Workspace settings -> "Manage access" and add the service principal with Contributor or Admin permissions. For finer control, grant access at the Lakehouse level.

Troubleshooting​

ProblemSolution
Authentication / access deniedVerify client ID, tenant ID, and secret. Confirm Contributor role on workspace. Verify OneLake is enabled.
Invalid URL formatUse onelake:// prefix. Format: onelake://workspace-name/lakehouse-name/path/. Ensure path ends with /.
Connection timeoutCheck firewall rules and verify Fabric workspace is network-accessible.
Copyright © 2026 Architecture & Performance.