ERROR 5873 on COPY LOCAL command
We've had problems in our environment trying to load data from a .csv file on a local machine via the vsql client.
dbadmin=> COPY sample_schema.sample_table
dbadmin-> FROM LOCAL 'C:\Users\filePath.csv'
dbadmin-> DELIMITER ',';
ERROR 5783: Client error: Could not open file [C:\Users\filePath.csv] for reading (in function statFiles() at Bulkload.cpp:312)
Has anyone else had this error? The file exists and is fully accessible on the local machine; is there something extra required to allow vsql to read files from certain paths, etc.?
dbadmin=> COPY sample_schema.sample_table
dbadmin-> FROM LOCAL 'C:\Users\filePath.csv'
dbadmin-> DELIMITER ',';
ERROR 5783: Client error: Could not open file [C:\Users\filePath.csv] for reading (in function statFiles() at Bulkload.cpp:312)
Has anyone else had this error? The file exists and is fully accessible on the local machine; is there something extra required to allow vsql to read files from certain paths, etc.?
0
Comments
Hello Kate,
I have managed to produce the same error on my windows client (I am assuming you are running vsql from windows given the path 'C:\users')
The quickest and easiest fix is to grant 'everyone' full permission to the file "filePath.csv".
In windows explorer, right click the file > properties > security, then grant 'Everyone' full access to the file
On my system, as soon as I remove 'everyone' from the permission of the file, the error is produced. Even though administrator and the user I am running vsql under have read/execute permission to the file.
Please let me know if that will also solve your issue.
Regards,
Han