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. Trino
  3. Connection

On this page

  1. Required Fields
  2. Authentication
  3. Optional Fields
  4. Troubleshooting
  5. Per-Request Impersonation

Connection

Configure the connection to a Trino coordinator.

A Trino data source's connection is a TrinoConnectionConfig. It mirrors the standalone trino-client options.

1
2
3
4
5
6
7
8
9
10
11
12
dataSources: {
  warehouse: {
    adapter: "trino",
    connection: {
      host: "https://trino.example.com",
      port: 8080,
      catalog: "hive",
      auth: { type: "basic", username: "svc", password: "..." },
    },
  },
}

Required Fields #

  • host — coordinator hostname including protocol (for example, https://trino.example.com ).
  • port — coordinator port (1–65535).
  • catalog — default catalog for queries.
  • auth — TrinoAuth , see below.

Authentication #

1
2
3
4
5
6
// Basic auth
auth: { type: "basic", username: "svc", password: "..." }

// Bearer token
auth: { type: "bearer", token: "..." }

Optional Fields #

  • schema — a default schema.
  • source — identifier sent as X-Trino-Source .
  • timeout — default query timeout in milliseconds.
  • retry — forwarded unchanged to the Trino client.
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 passwords or tokens.

Troubleshooting #

Common setup issues
  • Coordinator unreachable — check that host includes the protocol ( https:// or http:// ) and that port matches the coordinator's HTTP(S) port; a connection failure usually points to network/firewall reachability rather than a config typo.
  • Authentication rejected — check that auth.type matches what the coordinator expects ( basic vs. bearer ) and that the credentials have not expired or been rotated.
  • Catalog or schema not visible — check that the configured catalog (and schema , if set) exist on the coordinator and that the authenticated user has access to them.

Per-Request Impersonation #

Set an impersonationResolver on a Trino data source to run queries as the calling user. See Trino user impersonation.

Previous page

Trino

Next page

Write Config