Interface: LakebasePoolConfig
Interface: LakebasePoolConfig
Configuration for creating a Lakebase connection pool
Supports two authentication methods:
- OAuth token authentication - Provide workspaceClient + endpoint (automatic token rotation)
- Native Postgres password authentication - Provide password string or function
Extends pg.PoolConfig to support all standard PostgreSQL pool options.
See
https://docs.databricks.com/aws/en/oltp/projects/authentication
Extends
PoolConfig
Properties
endpoint?
optional endpoint: string;Endpoint resource path for OAuth token generation.
Retrieve the value using the Databricks CLI:
databricks postgres list-endpoints projects/{project-id}/branches/{branch-id}Use the name field from the output.
Required for OAuth authentication (unless password is provided) Can also be set via LAKEBASE_ENDPOINT environment variable
Example
"projects/{project-id}/branches/{branch-id}/endpoints/{endpoint-identifier}"logger?
optional logger: Logger | LoggerConfig;Optional logger configuration.
Supports three modes:
- Logger instance - Use your own logger implementation
- LoggerConfig - Enable/disable specific log levels (uses console)
- Undefined - Defaults to error logging only
Examples
import { createLogger } from '@databricks/appkit';
const pool = createLakebasePool({
logger: createLogger('connectors:lakebase')
});const pool = createLakebasePool({
logger: { debug: true, info: true, error: true }
});sslMode?
optional sslMode: "require" | "disable" | "prefer";SSL mode for the connection (convenience helper) Can also be set via PGSSLMODE environment variable
Default
"require"telemetry?
optional telemetry: TelemetryOptions;Telemetry configuration
trueor omitted: enable all telemetry (traces, metrics) -- no-op when OTEL is not configuredfalse: disable all telemetry{ traces?, metrics? }: fine-grained control
workspaceClient?
optional workspaceClient: WorkspaceClient;Databricks workspace client for OAuth authentication If not provided along with endpoint, will attempt to use ServiceContext
Note: If password is provided, OAuth auth is not used