Interface InsertParams<Stream, T>

Type Parameters

  • Stream = unknown

  • T = unknown

Hierarchy

Properties

abort_signal?: AbortSignal

AbortSignal instance to cancel a request in progress.

auth?: {
    password: string;
    username: string;
}

When defined, overrides the credentials from the BaseClickHouseClientConfigOptions.username and BaseClickHouseClientConfigOptions.password settings for this particular request.

Type declaration

  • password: string
  • username: string

Default

undefined (no override)
clickhouse_settings?: ClickHouseSettings

ClickHouse's settings that can be applied on query level.

columns?: NonEmptyArray<string> | InsertColumnsExcept

Allows to specify which columns the data will be inserted into. Accepts either an array of strings (column names) or an object of InsertColumnsExcept type. Examples of generated queries:

  • An array such as ['a', 'b'] will generate: INSERT INTO table (a, b) FORMAT DataFormat
  • An object such as { except: ['a', 'b'] } will generate: INSERT INTO table (* EXCEPT (a, b)) FORMAT DataFormat

By default, the data is inserted into all columns of the InsertParams.table, and the generated statement will be: INSERT INTO table FORMAT DataFormat.

See also: https://clickhouse.com/docs/en/sql-reference/statements/insert-into

format?: DataFormat

Format of the dataset to insert. Default: JSONCompactEachRow

query_id?: string

A specific query_id that will be sent with this request. If it is not set, a random identifier will be generated automatically by the client.

query_params?: Record<string, unknown>
session_id?: string

A specific ClickHouse Session id for this query. If it is not set, BaseClickHouseClientConfigOptions.session_id will be used.

Default

undefined (no override)
table: string

Name of a table to insert into.

values: InsertValues<Stream, T>

A dataset to insert.

Generated using TypeDoc