Skip to main content
⚠️ AppKit is in an early development phase and is subject to change without notice. DO NOT use in production environments.

# Interface: LakebasePoolConfig

Configuration for creating a Lakebase connection pool

Supports two authentication methods:

1. OAuth token authentication - Provide workspaceClient + endpoint (automatic token rotation)
2. 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:

1. Logger instance - Use your own logger implementation
2. LoggerConfig - Enable/disable specific log levels (uses console)
3. 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

- `true` or omitted: enable all telemetry (traces, metrics) -- no-op when OTEL is not configured
- `false`: 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