Load data from Google Cloud Storage
Learn how to load data into Exasol from Google Cloud Storage buckets.
You can use the IMPORT and EXPORT commands to exchange data with files in Google Cloud Storage (GCS). Exasol automatically recognizes GCS as the source or destination based on the URL used with the IMPORT/EXPORT statement.
Prerequisites
An HMAC key for the Google project. For more information, see HMAC keysin the Google Cloud documentation.
Create connection
To prevent connection details from being exposed in logs and audit tables, we recommend that you always create a connection object using CREATE CONNECTION and authenticate using the saved connection instead of providing the details openly in the IMPORT/EXPORTstatements.
Example:
CREATE CONNECTION GCS_CONNECTION
TO 'https://testbucket.storage.googleapis.com'
USER '<access_id>'
IDENTIFIED BY '<secret>';
-
Path-style URLs such as
https://storage.googleapis.com/<bucket>are not supported. Exasol only supports virtually hosted cloud storage URLs using the following format:https://<bucket>.storage.googleapis.com. -
OAuth 2.0 authentication is not supported.
Import or export data
Examples:
IMPORT INTO testtable FROM CSV AT GCS_CONNECTION
FILE 'testpath/test.csv';
EXPORT testtable INTO CSV AT GCS_CONNECTION
FILE 'testpath/test.csv';