Microsoft OneLake
Microsoft OneLake is the single, unified, logical data lake for Microsoft Fabric. Every Fabric tenant gets one OneLake, and data is organized into workspaces and lakehouses backed by Azure Data Lake Storage Gen2.
Bruin supports OneLake as a destination for Ingestr assets, so you can move data from any supported source into a Fabric lakehouse.
In order to set up the OneLake connection, you need to add a configuration item in the .bruin.yml file and in the asset file. You will need the workspace and lakehouse names along with credentials for Microsoft Entra ID authentication. For details on how to obtain these credentials, please refer here.
Writing to OneLake
Follow the steps below to correctly set up OneLake as a destination and run ingestion.
Step 1: Add a connection to .bruin.yml file
To connect to OneLake, you need to add a configuration item to the connections section of the .bruin.yml file. This configuration must comply with the following schema:
connections:
onelake:
- name: "my-onelake"
workspace_name: "myworkspace"
lakehouse_name: "mylakehouse"
# Authentication — provide ONE of the options below.
# Option 1: Service principal (Microsoft Entra ID)
tenant_id: "tenant-id"
client_id: "client-id"
client_secret: "client-secret"
# Option 2: SAS token
# sas_token: "sv=..."
# Option 3: DefaultAzureCredential (env vars, managed identity, or Azure CLI login)
# use_azure_default_credential: trueworkspace_name: The Fabric workspace name or GUID.lakehouse_name: The lakehouse name or GUID (the.Lakehousesuffix is added automatically).
OneLake requires Microsoft Entra ID authentication — shared account keys are not accepted. Provide one of the following authentication methods:
- Service principal:
tenant_id,client_id, andclient_secret. The service principal needs Contributor access to the workspace. - SAS token:
sas_token. - DefaultAzureCredential: set
use_azure_default_credential: trueto let ingestr authenticate via environment variables, a managed identity, or the Azure CLI login.
Step 2: Create an asset file for data ingestion
To ingest data to OneLake, you need to create an asset configuration file. This file defines the data flow from the source to the destination. Create a YAML file (e.g., stripe_onelake.yml) inside the assets folder and add the following content:
name: Tables/events
type: ingestr
connection: my-onelake
parameters:
source_connection: stripe
source_table: 'event'
destination: onelakename: The name of the asset. This is also used as the destination table (--dest-table) in the lakehouse — see Storage modes below.type: Specifies the type of the asset. Set this toingestrto use the ingestr data pipeline.connection: This is the destination connection, which defines where the data should be stored. Heremy-onelakepoints at the OneLake connection defined in.bruin.yml.source_connection: The name of the source connection defined in.bruin.yml.source_table: The table to ingest from the source.destination: Set toonelake.
Storage modes
The asset name is passed to ingestr as the destination table, and its prefix determines how data is stored in the lakehouse:
Tables/<name>→ a Delta Lake table that is queryable in Fabric.Files/<path>→ raw Parquet files.- A bare name (e.g.
events) defaults toTables/.
Step 3: Run asset to ingest data
bruin run assets/stripe_onelake.ymlAs a result of this command, Bruin will ingest data from the given source into your Microsoft OneLake lakehouse.