This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
It would be good if we can customize the COPY command bulk issues. This is my COPY command and it loads successfully, bulk doesn't.
COPY scratch.table FROM 's3://xxxxxxxx-etl-staging/mssql/2017/' CREDENTIALS 'aws_access_key_id=xxxxxxxxxxxxx;aws_secret_access_key=xxxxxxxxxxxxxxxx' GZIP TRUNCATECOLUMNS IGNOREHEADER AS 1 CSV QUOTE AS '"' TIMEFORMAT AS 'YYYY-MM-DD HH:MI:SS' ACCEPTINVCHARS AS '^' DELIMITER '\t';
We don't support customizing the COPY command. I am not sure what is causing the issue with \. However, | is the delimiter we currently use for our COPY command. Being able to customize the delimiter is a great idea, though; you should post it in the Idea Center.
In the meantime, you could use a MultiField formula to replace all the |s (and \s) in your string fields with some other delimiter (like \t) before running your data into the Bulk Loader.
Just for future users, the error that shows up when backslashes (\) occur in the data can be as nondescript as
Output Data (6) The COPY failed with error: [Amazon][RedShift ODBC] (30) Error occurred while trying to execute a query: ERROR: Load into table 'opex' failed. Check 'stl_load_errors' system table for details.¶ Last entry in stl_load_errors: 0,
Lisa LePome Customer Support Engineer -- Knowledge Management Coach Alteryx, Inc.