COPY TO
statement is as follows:
AWS_CRED
with AZURE_CRED
or GCS_CRED
when copying to the Azure Blob Storage or Google Cloud Storage.table_name
: table containing the data to be exportedfile_path
: CSV file location accessible from the serverAWS_CRED
:
aws_region
: AWS region associated with the storage service (e.g. ‘region1’)key_id
: key identifier used for authenticationaccess_key
: access key used for authenticationendpoint_url
: URL endpoint for the storage serviceGCS_CRED
:
<path_to_credentials>
: path to JSON credentials file.<json_credentials_string>
: contents of the GCS’s credentials fileAZURE_CRED
:
tenant_id
: tenant identifier representing your organization’s identity in Azureclient_id
: client identifier used for authentication.client_secret
: secret identifier acting as a password when authenticatingCOPY TO
statement to export data from the students
table to a CSV file named students_file
.
student
table data is copied to the students_file
on AWS S3
COPY TO
statement to export data, but this time, the data is stored on Google Cloud Storage.
credentials.json
file, you can also pass its contents as a string in the following way:
AWS_CRED
like below:
project
table is copied to the project_file
on Google Cloud Storage
taxi_data
table is copied to your_blob
on Azure Blob Storage