S3
Identifies the source location of files in an Amazon S3 bucket. Use the S3 function in conjunction with a COPY
statement to import data into a Vertica cluster from an S3 object.
Syntax
S3( url='object-url'[, delimiter='char' ] | bucket='objecturl' )
Parameters
url[, delimiter='char']
|
Specifies the URLs of one or more S3 objects to import, either the HTTPS URL or the S3 URL. URLs should contain only ASCII characters, 0x01 to 0x7F. If you specify multiple URLs, you can optionally qualify this parameter by specifying a delimiter character, by default
|
bucket
|
URL of the bucket when importing multiple files using glob expansion. |
Privileges
Write privileges on the table you are copying to.
Examples
The following statement specifies to import multiple files. Object URLs are delimited by vertical bars, the default delimiter:
=> COPY exampleTable SOURCE s3(url='s3://exampleBucket/object1|S3://exampleBucket/object2');
Import all files in a bucket using glob expansion:
=> COPY table1 WITH SOURCE S3(bucket='S3://exampleBucket/*');
=> COPY exampleTable SOURCE S3(bucket='s3://exampleBucket/');
=> COPY exampleTable SOURCE S3(bucket='s3://exampleBucket');