For you to be able to use COPY FROM S3, it must be enabled on your Data Warehouse instance. Enabling COPY FROM S3 is done by GoodData Support.
Send a request to GoodData Support to enable COPY FROM S3 on your Data Warehouse instance. In the request, include the ID of your Data Warehouse instance and the names of the S3 buckets from which you want to copy data.
COPY FROM S3 does not support an EXCEPTIONS clause. COPY FROM S3 stores rejected data and exceptions as tables.
This means that you cannot specify EXCEPTIONS and REJECTED DATA files the same way you would do when using COPY FROM LOCAL. For example, the following command syntax would work for COPY FROM LOCAL but would fail for COPY FROM S3:
The rejected data table is created as LOCAL TEMPORARY. The table is dropped once the session is closed.
- You cannot run multiple COPY commands within a single statement.
Use COPY FROM S3
Set the credentials for your S3 bucket. The credentials must include the access key, secret key, and region.
- Disable auto-commit mode for the JDBC driver. To do so, set AUTO_COMMIT to 'false'.
Run COPY FROM S3.
Incorrect: Cannot use a file to store rejected data
Incorrect: Cannot use an EXCEPTIONS clause