Skip to main content

Microsoft Fabric OneLake

Exports Parquet files to OneLake via Service Principal authentication.

Configuration

{
"onelake_storage": {
"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 -a auth.json --lxdb_auth_id lxdb_ms \
--source_db_auth_id ds_03_pg \
--target_storage_id fabric_onelake \
--fastbcp_dir_path /path/to/fastbcp

With config creation:

python lxpress.py config create \
-a auth.json \
--lxdb_auth_id lxdb_ms \
--source_db_auth_id ds_04_pg \
--source_db_name tpch \
--source_schema_name tpch_1 \
--fastbcp_dir_path /path/to/fastbcp \
--fastbcp_p 2 \
--n_jobs 4 \
--target_storage_id fabric_onelake \
--generate_metadata

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.