# Connect DataGrip to Zuar Runner [DataGrip](https://www.jetbrains.com/datagrip/) is an IDE that you write out and test your SQL queries in prior to using them in Zuar Runner. Since Zuar Runner does not check the validity of a SQL query statement, it is advised to test them prior to implementing them in Zuar Runner. DataGrip provides this ability or you can use another IDE or query testing software to verify the validity of those SQL query statements (e.g., Postman for PostgreSQL databases). If you are new to DataGrip, you can checkout this [quick start guide](https://www.jetbrains.com/datagrip/quick-start/). ## Connecting Zuar Runner to DataGrip Zuar Runner uses a PostgreSQL database to stage your data. Thus, Zuar Runner is connected to DataGrip following DataGrip's PostgreSQL [instructions](https://www.jetbrains.com/help/datagrip/connecting-to-a-database.html#connect-to-postgresql-database). You will need the following information to connect DataGrip to your Zuar Runner instance. - **Host**: (instance name).zuarbase.net - **Port**: 5432 - **User**: (your username) - **Password**: (your password) - **Database**: analytics .. |connection| image:: assets/connect-datagrip-to-mitto__connection.png :alt: connect datagrip to mitto ui Following the steps from DataGrip you will need to do the following: 1. Navigate to **file** in top navigation bar of DataGrip. 1. Click on **Data Sources**. 1. In **Data Sources and Drivers** click on the **+** icon to add a database. 1. Select PostgreSQL. 1. Now enter in your credentials. .. NOTE:: Click on **Download missing driver files** link on the bottom of the **Data Sources and Drivers** window. |connection| 1. Click **Test Connection** to make sure DataGrip is connected. ## Using DataGrip Now that your Zuar Runner database is connected to DataGrip you can test the validity of your queries before using them in your Query jobs. Here is an example of a query. A companion plant file was uploaded to the example Zuar Runner instance. To select all of the information from the table the following query is used: ```sql SELECT * FROM companions; ``` As you can see, DataGrip is showing the results of the query as being successful: .. image:: assets/connect-datagrip-to-mitto__query-results.png :alt: successful query .. NOTE:: Note the check mark in the righthand side next on the same line of the SQL query. Here is a poorly constructed query, since a 'plants' table was never created: ```sql SELECT * FROM plants; ``` .. image:: assets/connect-datagrip-to-mitto__query-fail.png :alt: unsuccessful query .. NOTE:: *Note the red ! in the place where the checkmark was. Also, note the error logs in the output tab at the bottom of the window.*