ClickHouseConn
class ClickHouseConn(
host: str,
staging: StagingConfig,
port: int = 8123,
database: str = 'default',
credentials: UserPasswordCredentials | None = None,
secure: bool = False,
enforce_connection_params: bool = True,
cx_src_configs_clickhouse: dict | None = None,
cx_dst_configs_clickhouse: dict | None = None,
)
Bases: Conn
Categories: connections
Represents a connection configuration for ClickHouse with cloud-staged bulk loading.
ClickHouse ingests data via cloud storage (S3, Azure Blob, or GCS): files are
first uploaded to the configured staging area and then loaded into ClickHouse
using the matching table function (s3(), azureBlobStorage(), or
s3() pointed at GCS).
Represents a connection configuration for ClickHouse with cloud-staged bulk loading.
ClickHouse ingests data via cloud storage (S3, Azure Blob, or GCS): files are
first uploaded to the configured staging area and then loaded into ClickHouse
using the matching table function (s3(), azureBlobStorage(), or
s3() pointed at GCS).
Parameters
hostClickHouse server hostname or IP address.
stagingCloud storage staging configuration. Provide one of: * :class:~tabsdata._io.cloud_staging.common.storage_config.S3Config — stage files in Amazon S3 and read with ClickHouse's s3() table function. * :class:~tabsdata._io.cloud_staging.common.storage_config.AzureConfig — stage files in Azure Blob Storage and read with azureBlobStorage(). * :class:~tabsdata._io.cloud_staging.common.storage_config.GCSConfig — stage files in Google Cloud Storage and read with ClickHouse's s3() table function via the GCS S3-compatible HMAC API.
portHTTP(S) port of the ClickHouse server. Use 8123 for plain HTTP (default) and 8443 for HTTPS/TLS.
databaseTarget database name. Defaults to "default".
credentials:class:~tabsdata.UserPasswordCredentials for ClickHouse authentication. When None the ClickHouse default user with no password is used.
secureIf True, connect to ClickHouse over HTTPS/TLS. Defaults to False.
enforce_connection_paramsWhether to enforce connection parameters for the ClickHouse connection. Applicable only for connections to a ClickHouse destination. Defaults to True.
cx_src_configs_clickhouseSource-specific configuration parameters for the ClickHouse connection. Defaults to None.
cx_dst_configs_clickhouseDestination-specific configuration parameters for the ClickHouse connection. Defaults to None.
Properties
credentialsUserPasswordCredentials | NoneThe credentials used to authenticate with ClickHouse. None if no
credentials were provided (ClickHouse default user, no password).
cx_dst_configs_clickhousedictDestination-specific configuration parameters for the ClickHouse connection.
cx_src_configs_clickhousedictSource-specific configuration parameters for the ClickHouse connection.
databasestrThe target ClickHouse database name.
enforce_connection_paramsboolWhether to enforce connection parameters for the ClickHouse connection.
hoststrThe ClickHouse server hostname or IP address.
portintThe HTTP(S) port of the ClickHouse server.
secureboolWhether to connect to ClickHouse over HTTPS/TLS.
stagingStagingConfigThe cloud storage staging configuration (S3Config, AzureConfig, or GCSConfig).