admin管理员组文章数量:1122832
I'm trying to copy a csv file in a table using PSQL tool but i receive the error: no such file or directory. This is the command: \copy company_dim FROM 'C:\Users\Username\Desktop\Data Studio\company_dim.csv/company_dim.csv' WITH (FORMAT csv, HEADER true, DELIMITER ',', ENCODING 'UTF8') I already saw other similar questions around, but no proposed solution seems to work. (i specify, the error is just "no such file or directory" not "could not connect to server...") To have more information: i'm following Luke Barousse's Youtube course on SQL. What i did should solve a permission problem from VScode, but it results in this other issue. I literally followed the problem solution proposed, which is:
Database Load Issues (follow if receiving permission denied when running SQL code below)
NOTE: If you are having issues with permissions. And you get error:
'could not open file "[your file path]\job_postings_fact.csv" for reading: Permission denied.'
- Open pgAdmin
- In Object Explorer (left-hand pane), navigate to
sql_course
database - Right-click
sql_course
and selectPSQL Tool
- This opens a terminal window to write the following code
- Get the absolute file path of your csv files
- Find path by right-clicking a CSV file in VS Code and selecting �Copy Path�
- Paste the following into
PSQL Tool
, (with the CORRECT file path)
I changed the position of the csv folder; I changed the permissions of the files; I tried to change the console code page; i set the windows path for postgreSQL. I tried the command "copy" instead of "\copy". Also tried changing \ with /.
本文标签: postgresqlcopy PSQL give the error no such file or directoryStack Overflow
版权声明:本文标题:postgresql - copy PSQL give the error: no such file or directory - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300560a1930859.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论