Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

Import csv files via SQL doesn't work

$
0
0

Hi everyone,

 

I am trying to import csv files via SQL, and it doesn't work even though I am following the instructions on IMPORT FROM - SAP HANA SQL and System Views Reference - SAP Library

 

The steps I am following are:

 

I create a table mytable to store the imported data.

CREATE TABLE mytable ( A INT, B VARCHAR(10));

 

I create a CSV text file /data/data.csv and add the following contents.

1,"DATA1"
2,"DATA2"
3,"DATA3"
4,"DATA4"

 

I then execute the following command to import the data.

IMPORT FROM CSV FILE 'C:/Users/cnumber/Desktop/TEST1.csv' INTO "MYTABLE" WITH RECORD DELIMITED BY '\n' FIELD DELIMITED BY ',';

 

Everything is done perfectly:

 

 

Statement 'CREATE TABLE mytable ( A INT, B VARCHAR(10))'

successfully executed in 160 ms 534 µs  (server processing time: 86 ms 711 µs) - Rows Affected: 0

 

But this is the error i get:

 

 

Could not execute 'IMPORT FROM CSV FILE 'C:Users/cnumber/Desktop/TEST1.csv' INTO "MYTABLE" WITH RECORD DELIMITED BY ...'

SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

 

 

Any suggestions?

 

Best,

Christoforos


Viewing all articles
Browse latest Browse all 3131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>