How to Export/Import a Data Source from DataGrip?

You can do it easily via the clipboard, although it took me a while to figure it out:

  1. in your source project, open the Database tool window, select the data sources you want to export, then right click / "Database Tools..." / "Copy Settings"
  2. in your target project, open Database tool window, click on "+" then "Import from Clipboard"

Also works between DataGrip and IntelliJ.

Addendum The wording has changed slightly in DataGrip 2018.2 EAP (or before), instead of "Copy Settings" it's now "Copy Data Source(s) to Clipboard", which reflects better what it does.


UPDATE FROM 2021!

Starting from version 2021.1, you can just press Ctrl/Cmd+C on the data source, and then Ctrl/Cmd+V it in another IDE. The clipboard contains XML for the data source, so you can send it to the colleague via e-mail, messenger etc.


It is possible! You need to share a project with your friend — all you do in DataGrip is in the context of a project. If you did not create a new one, everything is under the default project. Look at the gif:

enter image description here

The more detailed information can be found in the tutorial: https://blog.jetbrains.com/datagrip/2018/05/21/copy-and-share-data-sources-in-datagrip/