@lakeql/fabric-client is a standalone client for Microsoft Fabric SQL endpoints. It executes T-SQL over TDS using the mssql driver. It authenticates with Azure AD access tokens, resolved from the configured credentials or supplied per query for an on-behalf-of flow.
Install it:
pnpm add @lakeql/fabric-client1
2
3
4
5
6
7
8
9
10
11
12
import { FabricClient } from "@lakeql/fabric-client"
const client = new FabricClient({
host: "your-endpoint.datawarehouse.fabric.microsoft.com",
port: 1433,
catalog: "my_warehouse",
auth: { type: "bearer", token: "..." },
})
const rows = await client.query({ sql: "SELECT 1 AS n" })
await client.close()
This section covers client setup and executing queries. The full API reference comes at the end.