Differences between query consoles, scratch files, and user files
To run your statements and keep track of your code ideas, use DataGrip's special file types. You can also work with the files that you store on your machine.
The DataGrip's special file types are consoles and scratches. Query or database consoles are SQL files in which you can compose and execute SQL statements. SQL scratch files let you create temporary notes or draft up some code outside the project context.
In DataGrip, the files that you store on your machine are user files. To work with them, attach the directory with the files you need to your DataGrip project.
Executable SQL files that are attached to a specific data source.
Files that are not attached to a specific data source.
Files that are stored on your machine.
Find the attached directories at the top of the Files tool window. For query consoles, in the Files tool window, navigate to . Find scratch files under .
Consider the following figure that shows locations of the elements.
Console file tab.
Scratch file tab.
Schema selected in the <schema> list.
Attached session selected in the <session> list.