User files
User files are the files that are stored on your machine or any other place you have access to. In DataGrip, they are available to work with in the Files tool window.
For a directory to appear in the Files tool window (View | Tool Windows | Files), attach it to your project.
To attach a directory, do one of the following:
In the main menu, select to File | Open.
In the Files tool window (View | Tool Windows | Files), right-click any area and select Attach Directory to Project.
In the Files tool window (View | Tool Windows | Files), click the Attach Directory to Project button (
) in the toolbar.
In the file browser, navigate to the directory that you want to attach.
Click Open.

In the Files tool window (View | Tool Windows | Files), right-click the directory that you want to detach and click Detach Directory from Project.
In the notification dialog, click Detach.
SQL files are run against the selected databases or schemas using run configurations. To run an SQL file, you can either create a new run configuration, or edit an existing one.
For information about how to run an SQL files from your machine, see Run files.
For better coding assistance, assign an SQL dialect to an SQL file. An SQL dialect is a DBMS-specific version of SQL.
DataGrip lets you specify the SQL dialect for an individual file or all SQL and DDL files that can be stored in a directory, in your project, or on your computer.
Click the dialect list, which is in the upper-right corner of the window.
Select a dialect from the dialect list.
Open settings by pressing and navigate to Database | SQL Dialects.
Click the Add button
and select directories or files for which you want to change a dialect.
Click Open.
Click the SQL Dialect cell and select the necessary dialect.
Apply changes and click OK.