Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Defining a Redshift connection in DataGrip

I'm trying to define a Redshift connection in DataGrip but couldn't find any Redshift driver in the UI. I tried using both Postgres and generic Database Driver with no luck.

Has someone been able to configure this?

like image 672
Ziv Gabovitch Avatar asked Feb 14 '16 14:02

Ziv Gabovitch


People also ask

How do I connect Redshift to DataGrip?

In settings of the Redshift cluster, copy the JDBC URL. Paste the JDBC URL from the Redshift cluster settings to the URL field in DataGrip. In User and Password fields, specify your Redshift credentials. To ensure that the connection to the data source is successful, click the Test Connection link.

Can Data Studio connect to Redshift?

A Data Studio data source can connect to a single Amazon Redshift database table, or to a custom query you provide.


3 Answers

If you want to connect DataGrip to Redshift I suggest you use the jdbc drivers from AWS. Just download them to a directory where you can keep them.

Then you open DataGrip and go to the data sources menu (⌘;). File -> Data Sources...

Right-Click on one of the pre-installed drivers or somewhere in the driver section. And select 'Add → Driver' Add -> Driver

Give it a good name like 'Redshift' and in the bottom part, click on the + Symbol under Driver files, select the driver you just downloaded and click OK. Add the driver

Under class, select com.amazon.redshift.jdbc41.Driver, under Dialect, select PostgreSQL. Select Class and Dialect

Now you can go to the data sources menu (⌘;) and click on the "+" symbol in the top left corner and select the Driver you just created (in my case it's called "Redshift") as the data source type. Select Driver for new Connection

Now copy your redshift jdbc url (you can find it in your cluster configuration under "Cluster Database Properties") into the URL field and fill the user and password fields with your credentials. JDBC url

Now can you click on "Test Connection" and it should work.

I hope this helps. If you have further questions or problems to follow the instructions, feel free to comment.

like image 132
Jan Zeiseweis Avatar answered Oct 07 '22 21:10

Jan Zeiseweis


DataGrip added the native support for Amazon Redshift. So now it became a lot easier. enter image description here

like image 37
moscas Avatar answered Oct 07 '22 22:10

moscas


I succeed after all with Postgres driver (I had to add SSH tunnel - not relevant for this problem

like image 22
Ziv Gabovitch Avatar answered Oct 07 '22 21:10

Ziv Gabovitch