Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's not clear what is the CWD of the shell executing the SQL query #54

Open
FallenChromium opened this issue Sep 18, 2022 · 1 comment

Comments

@FallenChromium
Copy link

Hello! Thank you for this great extension, I love how it helps me to experiment with SQL DBs without losing any valuable info by creating tons of files (on the screenshot you can see what a mess was that before I've found this extension, LOL).

I have one issue with COPY .. FROM .. WITH CSV statements with the PostgreSQL driver though. The problem is that the queries executed in the notebook can't reach the csv files in my filesystem, and I'm not sure what's the correct path. Using absolute path works, but it kinda defeats the point of having a shareable folder with SQLs in it.
image
Is there a possibility to determine what's the cwd of SQL script file or to set it automatically/manually? I think cwd being set to the folder of the current file is the most intuitive solution.

@cmoog
Copy link
Owner

cmoog commented Sep 20, 2022

Thanks for the detailed info. I'll need to take a closer look to see if we can expose this as an option. I'm surprised it isn't defaulting to the workspace dir. Maybe it's defaulting to the cwd of the postgresql server process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants