DataGrip is an IDE that you write out and test your SQL queries in prior to using them in Mitto. Since Mitto does not check the validity of a SQL query statement, it is advised to test them prior to implementing them in Mitto. 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.

Connecting Mitto to DataGrip

Mitto uses a PostgreSQL database to stage your data. Thus, Mitto is connected to DataGrip following DataGrip's PostgreSQL instructions.

You will need the following information to connect DataGrip to your Mitto instance.

  • Host: (instance name)
  • Port: 5432
  • User: (your username)
  • Password: (your password)
  • Database: analytics

Following the steps from DataGrip you will need to do the following:

1. Navigate to file in top navigation bar of DataGrip.

2. Click on Data Sources.

3. In Data Sources and Drivers click on the + icon to add a database.

4. Select PostgreSQL.

5. Now enter in your credentials.

*Note: Click on Download missing driver files link on the bottom of the Data Sources and Drivers window.

6. Click Test Connection to make sure DataGrip is connected.

Using DataGrip

Now that your Mitto 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 Mitto instance. To select all of the information from the table the following query is used:

SELECT * FROM companions;

As you can see, DataGrip is showing the results of the query as being successful:

*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:

SELECT * FROM plants;

*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.