Google Cloud Storage (GCS) Object Store

File system using the Google Cloud Storage platform.

URI Format

gs://bucket/path

Authentication

To access data in Google Cloud Storage (GCS) you must first do the following tasks:

  • Create a default project, obtain a developer key, and enable S3 interoperability mode as described in the GCS documentation.

  • Set the GCSAuth configuration parameter as in the following example.

    => ALTER SESSION SET GCSAuth='id:secret';

Configuration Parameters

The following database configuration parameters apply to the GCS file system. You can set parameters globally and for the current session with ALTER DATABASE…SET PARAMETER and ALTER SESSION…SET PARAMETER, respectively. For more information about these parameters, see Google Cloud Storage Parameters.

Parameter Description
GCSAuth

An ID and secret key to authenticate to GCS. For extra security, do not store credentials in the database; instead, use ALTER SESSION…SET PARAMETER to set this value for the current session only.

GCSEnableHttps

Specifies whether to use the HTTPS protocol when connecting to GCS, can be set only at the database level with ALTER DATABASE…SET PARAMETER.

Default: 1 (enabled)

GCSEndpoint

The connection endpoint address.

Default:storage.googleapis.com

Examples

The following example loads data from GCS:

=> ALTER SESSION SET GCSAuth='my_id:my_secret_key';
			
=> COPY t FROM 'gs://DataLake/clicks.parquet' PARQUET;