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.
Amazon Redshift: Check 'stl_load_errors' system table for error details
When writing to Amazon Redshift, the following error appears:
Data Stream In (x): The COPY failed with error: [Amazon][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState XX000] ERROR: Load into table 'ayx1XXX' failed. Check 'stl_load_errors' system table for details.
In-DB connection to Amazon Redshift
Amazon Redshift uses the stl_load_errors table to track errors that happen when loading data to a Redshift table. This table contains error messages that will provide necessary detail to determine the cause for an error.
If the user doesn't have access to the table themselves, their DBA should be able to provide the same information.
Error Message examples
String length exceeds DDL length
Input data exceeded the acceptable range for the data type, try increasing the field size in Alteryx to resolve the error.
This often happens with multi-byte characters. In Alteryx, field size relates to characters, i.e.the value 'Góðan dag' only needs a field length of 9. In Redshift, field size is in bytes, to write out 'Góðan dag', the field size has to be at least 11.
Multibyte character not supported for CHAR (Hint: try using VARCHAR)
The CHAR datatype in Redshift only accepts single-byte UTF-8 characters. The VARCHAR datatype accepts multi-byte characters, to a maximum of four bytes. The WString datatype in Alteryx is translated into a CHAR datatype in Redshift. To load multi-byte characters into Redshift, use the V_WString datatype in Alteryx.