22

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?

Ricky McMaster
  • 4,289
  • 2
  • 24
  • 23
Ziv Gabovitch
  • 735
  • 1
  • 7
  • 18

3 Answers3

52

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.

Jan Zeiseweis
  • 3,718
  • 2
  • 17
  • 24
  • The URL that worked for me was: `jdbc:redshift://****.****.eu-central-1.redshift.amazonaws.com:5439/*****` (unchanged from the one provided on the console) – cyberbikepunk Apr 27 '16 at 09:38
  • I think I am running into [the issue mentioned here](https://blog.jetbrains.com/datagrip/tag/redshift/), which they say is fixed. On version `2017.1.1`. – theblang Apr 18 '17 at 15:50
  • For me that was never an issue for me. Where you able to fix it? – Jan Zeiseweis Apr 19 '17 at 08:10
14

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

moscas
  • 9,064
  • 36
  • 42
3

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

Ziv Gabovitch
  • 735
  • 1
  • 7
  • 18