GCSLocation
class GCSLocation(
bucket: GCSBucketSpec,
credentials: GCPJson,
hmac_credentials: GCPHmac,
base_path: CloudRelativePathSpec = '/',
cfg: CfgSpec | None = None,
)
Bases: CloudLocation
Categories: destination
GCS staging area for ClickHouseDest.
Carries two credentials, one per code path: credentials (GCP
service-account JSON) uploads parquet via the native GCS API, while
hmac_credentials (GCS HMAC keys) let ClickHouse's s3() table
function fetch the staged file back through the S3-compatible
endpoint (the only protocol ClickHouse speaks to GCS). Both are
required.
Parameters
hmac_credentialsGCPHmacGCS HMAC access-key / secret-key credentials (ClickHouse's S3-compatible read-back).
base_pathCloudRelativePathSpec (str | Secret)Object-key prefix from the bucket root; starts with
/, has no trailing / and no empty segments (//)
(the leading / is trimmed when forming the key).
Defaults to /.
Optional config dict; its obstore.* keys configure the
store parquet is staged through. An endpoint key is refused:
ClickHouse reads GCS through Google's S3-compatible endpoint.
Methods
validatedef validate()
Refuse an obstore.* key that moves the store elsewhere.
Called by the framework; raises ClickHouseValidateException.