Fully managed cloud. 30-day FREE full featured trial. Start Now
cancel
Showing results for 
Search instead for 
Did you mean: 

EXASOL import from csv fails when only one line and last column null

zgrzendekc
Contributor

Hello community!

I think I found a bug in EXASOL import from csv function for a specific case (file with only one line and last column null).

Please fin below the bug description and the files to run the tests.

 

  1. bug description

When trying to import a basic CSV (1 line and 2 cols) where last column is null, the import fails:

SQL:

select
*
from
(
IMPORT INTO (
X VARCHAR(3),
Y VARCHAR(10)
) FROM CSV AT AMAZON_BUCKET 'NOTWORKING.CSV'
ENCODING='UTF-8' SKIP=1 ROW SEPARATOR = 'LF' COLUMN SEPARATOR = ';'
)

File:

A;B
X;

Error:

ETL-6009: Number of columns in source (=3) and destination (=2) table differs

2. working case

2.1 1st case

If I execute the same command and only change last col value it is working.

File:

A;B
X;Y

 

2.2 2nd case

funnily enough, if case described in 1. is reproduced but duplicated on two lines, it is working perfectly.

File:

A;B
X;
Y;

 

Seems like there is an inner loop variable not correctly initialized 😉

 

2 REPLIES 2

exa-Aleksandr
Team Exasol
Team Exasol

Hi @zgrzendekc 

Could you try to add a new line the end?

Otherwise, the situation is ambiguous: is the last column null or actually missing?

zgrzendekc
Contributor

Hi,

Column is empty (nothing at all).

It behaves perfectly fine and there is no ambiguity when the file has (header excluded) more than one line. This problem only occurs if number of lines = 1.

We might try to add one line but that would be costly and not meaningful as very specific as described above.