Skip to main content

Google Cloud Storage Reference

Authentication options and data type handling for GCS connections. GCS is accessed through the S3 interoperability layer (type: s3 with endpointUrl: https://storage.googleapis.com).

Authentication

VariableExampleDescription
DATACONTRACT_S3_ACCESS_KEY_IDGOOG1EZZZ...The GCS HMAC Key ID
DATACONTRACT_S3_SECRET_ACCESS_KEYPDWWpb...The GCS HMAC Key secret

The location in the servers block must use the s3:// scheme (not gs://).

Data types

Same as Amazon S3: CSV and JSON files are read as the contract's types (no type checks; JSON additionally validated against a JSON Schema derived from the contract), Parquet and Delta column types are checked against the contract's logicalType by category. physicalType is never checked against file sources.

Logical type mapping

When no physicalType is declared, the CLI derives the DuckDB column type from the logicalType when reading files. This table is generated from the converters in the CLI's code:

logicalTypeCSV read typeParquet read type
stringVARCHARVARCHAR
integerBIGINTINTEGER
numberDOUBLEDECIMAL
booleanBOOLEANBOOLEAN
dateDATEDATE
timestampTIMESTAMPTIMESTAMP WITH TIME ZONE
timeTIMETIME
objectVARCHARSTRUCT()
arrayVARCHARVARCHAR[]