Save As / Export Database Console Files
Answered
Hi guys,
Is there a way to Save As / Export the database console files? I can't seem to see any context or menu actions that would support this.
Certain queries I like to keep on file, so I normally save these and store them.
Any help appreciated!
Thanks.
Please sign in to leave a comment.
you should have 'Scratches and consoles' node in your project tree, if you expand it, you'll see your consoles, and right-click on it will allow you to find them on file system with 'Show in...' option. please take a look at screenshot
Thanks Yuriy. As a work around that does what I need.
It would be nice if you could go to File > Save As perhaps to do this.
Yeah, old question I know but I've just switched to idea and I probably work in a similar way:
My database scripts are created interactively in the console, and saved in git.
To me they're just files. I see no reason for them to be treated specially.
So a feature to save-as a db console into a file-based playground seems logical rather than have to move them into the codebase via a file manager.
Andy Clapham You are welcome to upvote https://youtrack.jetbrains.com/issue/DBE-15128
There is also the ‘Copy File’ Refactoring Option you can use, instead of ‘Show in Explorer’. Then simply give the copy a new name and done. Or pick the same Option via Refactor in the top menu.
You can check the location of the console .sql file in DataGrip 2024+ by hovering on the console tab name.