While trying to import a CSV file to exasol, we are facing with the following error:
Error: ETL-3003: [Column=0 Row=0] [String data right truncation. String length exceeds limit of 100 characters]
The data in the first column and row in the file that we are trying to import has a length of less than 100 characters.
Any idea as to what might be going wrong?
Thank you for your quick replies.
@ecoh_drWe are importing files from S3 in parallel using this script. The encoding has been set to UTF-8 while calling S3_PARALLEL_READ, but I'm not sure whether the target column has the same encoding because a specific encoding was not provided while creating the table. If the encoding is different then that could be a reason for failure.
The IMPORT command is generated as a part of the S3_PARALLEL_READ function, and depends on the parameters you pass to that function. These are the file options that we are passing:
'ENCODING=''UTF-8'' SKIP=1 ROW SEPARATOR = ''LF'' COLUMN SEPARATOR = '','''
@mwellbroWe've set comma as the delimiter and skipped the header, and the file that we tried to import also has comma as a delimiter.
Hi @Saurabh. If you don't specify an encording on string columns while creating a table, the default setting is UTF8. You can check it with a "DESC schema_name.table_name" query.
Talking about trimming strings, having a look at the GitHub repository script I see there isn't a specific option, but there is the following statement:
The script s3_to_exasol.sql looks different than the other import scripts. It's made to load data from S3 in parallel and needs some preparation before you can use it. See our documentation for detailed instructions. If you just want to import a single file, see 'Import from CSV' above.