or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

authorization.mdcharts.mdcompiler.mdconditional-formatting.mddashboards.mddbt.mdee-features.mdexplore-fields.mdfilters.mdformatting.mdindex.mdmetric-queries.mdparameters.mdpivot.mdprojects-spaces.mdsql-runner.mdtemplating.mdtypes.mdutilities.mdvisualizations.mdwarehouse.md
tile.json

warehouse.mddocs/

Warehouse Integration

Common interface for 7 warehouse types.

Supported Warehouses

enum WarehouseTypes {
  BIGQUERY = 'bigquery',
  POSTGRES = 'postgres',
  REDSHIFT = 'redshift',
  SNOWFLAKE = 'snowflake',
  DATABRICKS = 'databricks',
  TRINO = 'trino',
  CLICKHOUSE = 'clickhouse'
}

WarehouseClient Interface

interface WarehouseClient {
  credentials: WarehouseCredentials;
  test(): Promise<void>;
  getCatalog(config: WarehouseCatalog): Promise<WarehouseCatalog>;
  streamQuery(sql: string, streamCallback: (data: WarehouseResults) => void, options?: any): Promise<void>;
  runQuery(sql: string, tags?: RunQueryTags, options?: any): Promise<WarehouseResults>;
}

interface WarehouseResults {
  fields: Record<string, { type: DimensionType }>;
  rows: Record<string, unknown>[];
}

Credentials

type WarehouseCredentials =
  | BigQueryCredentials
  | PostgresCredentials
  | RedshiftCredentials
  | SnowflakeCredentials
  | DatabricksCredentials
  | TrinoCredentials
  | ClickHouseCredentials;

interface SshTunnelConfiguration {
  enabled: boolean;
  host?: string;
  port?: number;
  username?: string;
  publicKey?: string;
}

interface SslConfiguration {
  enabled: boolean;
  ca?: string;
  cert?: string;
  key?: string;
}

function mergeWarehouseCredentials(
  target: WarehouseCredentials,
  update: Partial<CreateWarehouseCredentials>
): CreateWarehouseCredentials;