Import CSV to Database - Column Name

 I am trying to consume CSV file without headers using Import CSV to DB smart service (V2.2).  I have set File Has Header flag as false and giving column Name in this format ={"COL1","COL2"}. Column names are exactly same in DB . 

I get error when I try to upload the CSV file . Unknown Column 'COL1;COL2" in 'field List'.

I think issue is with the format in which I am giving column name . 

Please suggest ! 

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi Vishal, it could be a plugin issue. I investigated for ArrayIndexOutOfBounds:0 and found that- 

    1. If encrypted columns input is passed as null, within the code this is initialized by true/false based on the count of columns we provide in excel indicating if a column is encrypted or not. 

    2. When we set header false the variable is not initialized to correct length and while inserting to DB(insert function of Database Utils) it directly uses the index value of null variable which results in error.

    for (int i = 0; i < values_.length; i++) {
    			if(columnEncryptedFlags_[i]) {
    				values_[i]=es.decrypt(new TypedValue((long) AppianType.ENCRYPTED_TEXT, values_[i])); 
    			}
    			...}

    3. It is initialized properly when header is set to true.

     

    I believe updating this should fix this error. You can raise a request with Appian to update plugin if you choose to use it further.

     

    Thanks,

    Chitra

     

Children
No Data