LOAD a CSV
yeifer
Community Edition User
I have a problem when I want to load one .csv file, I did this
STEP 1
create table prueba(Id VARCHAR(100),Sepal_Length FLOAT,Sepal_Width FLOAT,Petal_Length FLOAT,Petal_Width FLOAT,Species VARCHAR(100));
STEP 2
COPY iris(Id,Sepal_Length, Sepal_Width,Petal_Length, Petal_Width,Species) FROM LOCAL 'C:\home\dbadmin\Documents\data\prueba.csv' WITH DELIMITER ',';
RESULT
ERROR 5783: Client error: Could not open file [\home\dbadmin\Documents\data\prueba.csv] for reading (in function statFiles() at Bulkload.cpp:338)
0
Answers
Are you reading from a Windows client?
I think you have to double the backslashes - let me try ...
Works as I had expected ....
I run this in linux
Then - just stick to the way file paths are used in Linux ...
please , can you tell me how can I access to this directory: $ vsql -c ,
@yeifer - Your posts seeme to be missing some content. Could you repost?
Well, you wrote
'C:\home\dbadmin\Documents\data\prueba.csv'
for the file name.On Linux, you would have to write :
'/home/dbadmin/Documents/data/prueba.csv'
.Or did you mean something else?