Skip to main content
Version: 1.9.0

StarRocksConn

class StarRocksConn(
host: str,
staging: StagingConfig,
port: int = 9030,
database: str = 'default',
credentials: UserPasswordCredentials | None = None,
enforce_connection_params: bool = True,
cx_src_configs_starrocks: dict | None = None,
cx_dst_configs_starrocks: dict | None = None,
)

Bases: Conn

Categories: connections

Represents a connection configuration for StarRocks with cloud-staged bulk loading.

StarRocks ingests data via cloud storage (S3, Azure Blob, or GCS): files are first uploaded to the configured staging area and then loaded into StarRocks using the FILES() table function in an INSERT INTO … SELECT * FROM FILES(...) statement.

Represents a connection configuration for StarRocks with cloud-staged bulk loading.

StarRocks ingests data via cloud storage (S3, Azure Blob, or GCS): files are first uploaded to the configured staging area and then loaded into StarRocks using the FILES() table function in an INSERT INTO … SELECT * FROM FILES(...) statement.

Parameters

parameter
host

StarRocks FE hostname or IP address.

parameter
staging

Cloud storage staging configuration. Provide one of: * :class:~tabsdata._io.cloud_staging.common.storage_config.S3Config — stage files in Amazon S3 and read with StarRocks' FILES() table function using s3:// paths. * :class:~tabsdata._io.cloud_staging.common.storage_config.AzureConfig — stage files in Azure Blob Storage and read with FILES() using wasbs:// paths. * :class:~tabsdata._io.cloud_staging.common.storage_config.GCSConfig — stage files in Google Cloud Storage and read with FILES() using s3a:// paths via the GCS S3-compatible HMAC API.

parameter
port

MySQL protocol port of the StarRocks FE server. Defaults to 9030.

parameter
database

Target database name. Defaults to "default".

parameter
credentials

:class:~tabsdata.UserPasswordCredentials for StarRocks authentication. When None the StarRocks root user with no password is used.

parameter
enforce_connection_params

Whether to enforce connection parameters for the StarRocks connection. Applicable only for connections to a StarRocks destination. Defaults to True.

parameter
cx_src_configs_starrocks

Source-specific configuration parameters for the StarRocks connection. Defaults to None.

parameter
cx_dst_configs_starrocks

Destination-specific configuration parameters for the StarRocks connection. Defaults to None.

Properties

property
credentialsUserPasswordCredentials | None

The credentials used to authenticate with StarRocks. None if no credentials were provided (StarRocks root user, no password).

property
cx_dst_configs_starrocksdict

Destination-specific configuration parameters for the StarRocks connection.

property
cx_src_configs_starrocksdict

Source-specific configuration parameters for the StarRocks connection.

property
databasestr

The target StarRocks database name.

property
enforce_connection_paramsbool

Whether to enforce connection parameters for the StarRocks connection.

property
hoststr

The StarRocks FE hostname or IP address.

property
portint

The MySQL protocol port of the StarRocks FE server.

property
stagingStagingConfig

The cloud storage staging configuration (S3Config, AzureConfig, or GCSConfig).