LakeQL
Overview
  • Package Map
query-builder
  • Filtering
  • Sorting & Paging
  • API Reference
config
  • Runtime Config
  • API Reference
trino-client
  • Client Setup
  • Executing Queries
  • Streaming
  • Metadata
  • API Reference
fabric-client
  • Client Setup
  • Executing Queries
  • API Reference
GitHub
LakeQL
  1. Packages
  2. fabric-client

fabric-client

A standalone TDS client for Microsoft Fabric SQL endpoints.

@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-client
1
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.

Client Setup

Create and configure a FabricClient.

Executing Queries

Run T-SQL statements and handle cancellation and on-behalf-of auth.

API Reference

Complete reference for the @lakeql/fabric-client public API.

Previous page

API Reference

Next page

Client Setup