cancel
Showing results for 
Search instead for 
Did you mean: 

How to resolve the Dataload error while importing the data from the CSV files?

former_member188628
Participant
0 Kudos

Hi All

      I have an excel(csv) file from which I want to load the data to an existing SAP HANA table.Following is the sample data of my excel file:-

Upon importing the data into the "ORDERS" table which is an existing table in SAP HANA:-

ORDERS table definintion:-

however the error during the import:-

Needed an help on this

Accepted Solutions (1)

Accepted Solutions (1)

SergioG_TX
Active Contributor
0 Kudos

Moumita,

please see this blog

make sure you do the correct mapping and that your data types match from your csv value to your HANA table...

former_member188628
Participant
0 Kudos

Hi Sergio

       Thanks a lot for the response. I was wondering about the mapping as you said:-

Initially error was being shown due to the date formats in the excel which i modified and reloaded, however, I have cross checked the mappings again but unable to trace out the mistake here

Thanks

Regards

former_member188628
Participant
0 Kudos

Hi

I guess the problem is with the date field:-

The initial date in the excel was one the preexisting date formats, however since in HANA the date should be YYYYMMDD format, hence i used the Text() function in excel to convert into that data type, however the current date type format is "General", since no similar date format is existing in EXCEL!!

SergioG_TX
Active Contributor
0 Kudos

ok- so, can you do a 2 step approach - load this into a temp table..

then from the temp table table insert into your existing table by selecting your columns which are ready and parse your date column as  to_date(dateCol)

former_member188628
Participant
0 Kudos

Hi Sergio

      One doubt, by parsing the date column, you mean to do it in excel or hana tables??One more thing, how parsing is done during data loads?

I am sorry, unaware of it.Is it handled differently in HANA?

Thanks

Regards

SergioG_TX
Active Contributor
0 Kudos

import into a temp hana table.. then from a sql console in hana, please insert into your exiting table from the temp imprted hana table

former_member188628
Participant
0 Kudos

Hi Sergio

       I have got a table with excel data loaded via import, which have Date field as integer type , as mentioned earlier due to the YYYYMMDD format, hence while loading the data from the table to temp table its ending up with error again:-

Regards

SergioG_TX
Active Contributor
0 Kudos

yep,,

so try..

insert into <yourTable> (COL1, COL2, etc, COL_DATE)

SELECT  COL1, COL2, etc, TO_DATE(COL_DATE)

FROM <YOURIMPORTEDTABLE>

former_member188628
Participant
0 Kudos

Hi Sergio

         Thanks a lotThe above solution worked. Thanks again,Now the "PurchaseDate" column is being displayed with the date values.

Regards

Answers (0)