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.

0
6 comments

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

0

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.

4

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.

0

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.

 

0

You can check the location of the console .sql file in DataGrip 2024+ by hovering on the console tab name.

0

Please sign in to leave a comment.