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
| Variable | Example | Description |
|---|---|---|
DATACONTRACT_S3_ACCESS_KEY_ID | GOOG1EZZZ... | The GCS HMAC Key ID |
DATACONTRACT_S3_SECRET_ACCESS_KEY | PDWWpb... | 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:
logicalType | CSV read type | Parquet read type |
|---|---|---|
string | VARCHAR | VARCHAR |
integer | BIGINT | INTEGER |
number | DOUBLE | DECIMAL |
boolean | BOOLEAN | BOOLEAN |
date | DATE | DATE |
timestamp | TIMESTAMP | TIMESTAMP WITH TIME ZONE |
time | TIME | TIME |
object | VARCHAR | STRUCT() |
array | VARCHAR | VARCHAR[] |