thalathala Community Edition User

Hi Team,

Now that s3export/s3export_partition are deprecated in vertica 12. How do we export a file to s3?

I've gone through the link which didn't help me understand

I've set the awsauth at the session level

Query is like below
SELECT s3export(a,b,c,d USING PARAMETERS url='s3:XXXX'||TO_CHAR(CURRENT_DATE,'YYYYMMDD')||'.txt', delimiter='|') OVER (ORDER BY record_no) FROM (select * from (   (sub-selects));


  • Options
    s_crossmans_crossman Vertica Employee Employee


    Export ORC, Parquet, and s3export were all consolidated into "export to file". Based on your example you are exporting to delimited so you'd use the export to delimited documented here https://docs.vertica.com/12.0.x/en/sql-reference/statements/export-to-delimited/.

    I have an s3 bucket exp2delim which exists, and I export a select from a table to a non-existent subfolder "mysubfolder".
    VMart=> export to delimited(directory='s3://exp2delim/mysubfolder') as select * from s3tester.parser;

    Rows Exported


    (1 row)

    Note my syntax has parans around parameters and single quotes around the s3 path. The example in the docs needs some touchup.

    I hope it helps.

  • Options
    thalathala Community Edition User

    Thanks @s_crossman . Will try that

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file