LakeQL
Overview
  • Introduction
  • Datasource Contract
  • API Reference
Writing
  • Write Strategies
  • Load Strategies
  • Partitioning
Storage
  • Storage Operations
Trino
  • Connection
  • Write Config
  • Metadata
  • API Reference
Fabric
  • Connection
  • Metadata
  • API Reference
GitHub
LakeQL
  1. Data Sources
  2. Fabric
  3. Connection

On this page

  1. Required Fields
  2. Authentication
  3. Troubleshooting
  4. Per-Request Identity

Connection

Configure the connection to a Microsoft Fabric SQL endpoint.

A Fabric data source's connection is a FabricConnectionConfig. It mirrors the standalone fabric-client options.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
dataSources: {
  reporting: {
    adapter: "fabric",
    connection: {
      host: "your-endpoint.datawarehouse.fabric.microsoft.com",
      port: 1433,
      catalog: "my_warehouse",
      auth: {
        type: "oauth2",
        tenantId: "...",
        clientId: "...",
        clientSecret: "...",
      },
    },
  },
}

Required Fields #

  • host — the Fabric SQL endpoint hostname.
  • port — the endpoint port (typically 1433 ).
  • catalog — default catalog (database) for queries.
  • auth — FabricAuth , see below.

An optional source field sets a source identifier for diagnostics.

Authentication #

Both forms resolve to an Azure AD access token:

1
2
3
4
5
6
// OAuth2 client credentials
auth: { type: "oauth2", tenantId: "...", clientId: "...", clientSecret: "..." }

// Static bearer token
auth: { type: "bearer", token: "..." }
The config is validated twice, at the defineConfig boundary and when the data source is created, using the same rules. Validation errors name the offending field but never include secrets or tokens.

The oauth2 form accepts an optional scope field. It is validated but currently has no effect. The token is always acquired for the Fabric SQL scope (https://database.windows.net/.default).

Troubleshooting #

Common setup issues
  • App registration not recognized — check that tenantId and clientId match an app registration that exists in the target tenant, and that clientSecret has not expired.
  • SQL endpoint unreachable — check that host is the workspace's Fabric SQL analytics endpoint (not the OneLake or Power BI endpoint) and that port is 1433 .
  • Permission denied on the warehouse — check that the app registration (or impersonated user) has been granted access to the target warehouse/lakehouse in Fabric's own workspace permissions, in addition to the Azure AD app registration existing.

Per-Request Identity #

The Fabric client supports an on-behalf-of flow. A per-query bearer token runs a statement as the calling identity rather than the service credential. A Fabric data source wires this through its impersonationResolver. See authentication.

Previous page

Fabric

Next page

Metadata