ETL-3003 String data right truncation

Padawan

Hello everyone,

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?

Regards,
Saurabh

4 REPLIES 4

Padawan

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.

 

Best,
Saurabh

Contributor

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.

 

Reading your first post, it looks like you're trying to import a single file. The CSV reference cites EXASOL-1774, maybe it's worth a try.

 

Regards,

Daniele

 

Contributor

Hi @Saurabh.

What encoding are you using in the IMPORT statement? Is it the same of the target column?

Have you tried to use the TRIM option? Please share the IMPORT command.

 

Regards,

Daniele

Xpert

Hi @Saurabh ,

maybe you have a header in your file ? Or your delimiter is "off" ( i.e. what you are delimiting with isn´t what the column separator is ? ) ?

 

Cheers,
Malte