cancel
Showing results for 
Search instead for 
Did you mean: 

Issue importing .CSV file from HANA DB folder path

Former Member
0 Kudos

Hi All,

I have created .csv file 'testdata1' and table "XXX"."testdata1".

Uploaded the 'testdata1.csv' file and "testdata1.ctl" file to the HANA DB work folder.

I am trying to run the import command as below and same i maintained in 'testdata1.ctl' file.

IMPORT FROM '/usr/sap/HD1/HDB11/work/Test data1.csv' INTO "XXX"."testdata1" WITH record delimited by '\n' FIELD DELIMITED BY ','

optionally enclosed by '"' error log 'x.err' COLUMN LIST ("salesorg", "division", "qty")

But i am getting the error as below

 

Could not execute 'IMPORT FROM '/usr/sap/HD1/HDB11/work/testdata1.csv' INTO "XXX"."testdata1" WITH record ...' in 14 ms 139 µs .

SAP DBTech JDBC: [2]: general error: Unknown keyword, kkkk .

I have the below data in my .csv file.

KKKK,K1,4000

LLLL,L1,5000

MMMM,M1,6000

Bothe .csv file and .Ctl files are having 777 permission.

Can any one suggests the solution if you faced the same issue.

Thanks & Regards,

Srini

Accepted Solutions (0)

Answers (3)

Answers (3)

mathanponnucham
Employee
Employee
0 Kudos

Dear Srini,

I would recommend you to check the syntax of the Import from csv file given at the very end of the link http://help.sap.com/hana/html/sql_import_from.html

Rgds,

Mat.

rindia
Active Contributor
0 Kudos

Hi Srinivas,

Keep the value in double quotes for first two columns.

Regards

Raj

rama_shankar3
Active Contributor
0 Kudos

How did you define the destination table. Please share structure of table. I am expecting table to have 1st 2 fields as varachar / char and then one tinyint. Also, how did you create your flat file - note pad is ideal - do not use excel unless you are sure on format saving options.

Is the err file being generated?

Let me know additional details mentioned above so that I can assist better.

Hope this helps.

Rama