DataGrip 2018.2.4 is Here

When it comes to the tools of your craft, it never hurts to make sure that you are always working with the most stable version. Please meet DataGrip 2018.2.4. Inside you’ll find the following have all been fixed:

  • DBE-7023 The Find Action not working when invoked from the Welcome Screen
  • DBE-7019 The JSON exported data being formatted to scientific notation instead of flat
  • DBE-7012 The import of a custom enum type to PostgreSQL from CSV not working
  • DBE-6996 The ClickHouse datasource not properly loading after an IDE restart
  • DBE-7007 The MySQL dialect configuration change which was lost after every IDE restart
  • DBE-6939 The delayed preview of changes in the Code Style settings

That’s mostly it. Again, if you find a bug, make sure to let us know. We’ll do our best to include a fix in an upcoming update. Enjoy!

The JetBrains Team
“The Drive to Develop”

Posted in Releases | Tagged , | Leave a comment

DataGrip 2018.2.3

Hello! This is another minor update for 2018.2. It includes several important bug-fixes.

Some people complained that the new SQL log was not really very friendly: the output panel would become hard to read due to the number of internal queries. So, we removed the internal queries from this panel: now you will see only the queries which were run explicitly by the user, including those, which were run from the UI.

Log

If you still need to inspect literally all the queries that DataGrip has run, check the SQL log file: Help → Show SQL log.

Other fixes:

DBE-6889: DataGrip executes procedures fine with old MySQL jdbc connectors.
DBE-6982: No more deadlock in read-only mode.
DBE-6810: We fixed the highlighting in DB2.
DBE-5459: Internal files are not shown in the Go to File list.
DBE-6939: No more lags in code formatter settings preview.
DBE-6823: Custom code style can be used as default.

Posted in Uncategorized | 4 Comments

DataGrip 2018.2.2: ClickHouse Support and Bugfixes

With just a few weeks since the last minor update, we’re in hurry again to bring you a fresh portion of improvements. Please welcome DataGrip 2018.2.2.

One of the highlights in this update is added support for ClickHouse (an open-source analytic DBMS for big data from Yandex). The update offers a dedicated driver, and allows you to browse the tables, views, table data, run queries, and pretty much everything (except exporting data and modifying tables).

Also, the update addresses the following issues:

  • The default row height in the Modify Table dialog is equal to the biggest row in the dialog (DBE-6443)
  • The Oracle Not-Equals operator “~=” causes a parse error (DBE-6817)
  • The SQL Server’s Filtered Index is not handled by the Modify Table action
  • Display schema names in the editor tabs if the Multiple Schemes checkbox is enabled (DBE-6693)
  • The Go to File action included non-project files (DBE-5459)
  • The formatter for Sql Server obscured spaces before and after the dot between the schema and table names (DBE-6874)
  • The new line concatenation not supported for PostgreSQL (DBE-6853)
  • Multiple JOINs with USING for MySQL sometimes were not resolved correctly in the editor (DBE-6844)

Last but not least, the update fixes a few performance issues related to VCS (file scanning).

That’s mostly it. Hope you’ll enjoy these improvements. The update available within the IDE (if you’re running DataGrip 2018.2.1), from the Toolbox App, and from the DataGrip website.

P.S.: In case you have an issue, a question, or a feature suggestion, make sure to share it here in the comments or report it directly to our issue tracker.

The JetBrains Team
“The Drive to Develop”

Posted in Features, Minor updates | Tagged , , | 1 Comment

DataGrip 2018.2.1

Hello! This is a first small update for 2018.2 Here is the list of important enhancements:

Owners are generated in PostgreSQL and Redshift

Screenshot 2018-08-02 18.41.14

New experimental Search Everywhere

IntelliJ Platform 2018.3 will introduce some changes that you can already start playing with, namely a new Search Everywhere dialog. It is the result of merging Search Everywhere, Go to table/procedure/class, Go to file, Go to symbol, and Find action.

SearchEverywhere

To turn it on, open the Maintenance dialog (Ctrl+Alt+Shift+/ on Windows and Linux or Cmd+Alt+Shift+/ on macOS), select Experimental features, and enable the new.search.everywhere check-box. Please keep in mind that this feature is still under heavy development.

ExperimentalFeatures

Bug fixes

DBE-6751: Default precision for common data types are now generated when executing a procedure.
DBE-6818: Working with Postgres 11 is possible now.
DBE-6753: Drag and drop works to move data source to a group.
DBE-6796: Data source group name can be used when navigation to an object.
DBE-6797: Slashes work as a path separator when renaming a data source.

Posted in Uncategorized | 4 Comments

DataGrip 2018.2

Hello! Please give a warm welcome to our new major release, DataGrip 2018.2!

Splash

Starting with this version, the database functionality of IntelliJ-based IDEs is available in CLion and AppCode. So if use one of these IDEs welcome to our blog :) Also, those who use WebStorm and DataGrip simultaneously can now install a database plugin inside WebStorm.

We thank all of the EAP contributors who have helped us by testing all the new features added in this release. Let’s have a look at what’s in there.

SQL log
New SQL formatter
Running stored procedures
Source code migrations
Query plan diagram
SQL editing
Data editor
UI upgrades

SQL Log

First, now you’ll see every query that DataGrip runs in the console output. Whether it’s your SQL or something DataGrip needs to run internally, check the Output tab to understand what’s going on.

SQLLogConsoleOutput

Second, literally all queries from the IDE are now logged in a text file.

SQLLogFile
To open this file, go to Help -> Show SQL log.

SQLLogShowInFinder

New SQL formatter

Thanks for sharing your ideas about SQL styles with us! We hope that now DataGrip will be able to accommodate many more different code styles.
The new SQL formatter is a feature we strongly need feedback on, so please try it out and if your specific cases are not covered, do let us know. We are still working on new clauses to add.

Formatter

As you may already know, you can create custom Code Style schemes.

ActionsOnCodeStyle

Now any of them can be used specifically for each data source. To do this, go to the Options tab of the data source properties.

SetCodeStyle

Running stored procedures

This long-awaited feature has been implemented for Oracle and PostgreSQL! Support for SQL Server procedures is only available in DataGrip for now, but will soon appear in the 2018.2.1 updates of other JetBrains IDEs.
Select Execute from the context menu of the procedure:

ExecuteProc

The SQL code will be generated. Put in the values of the parameters you need and click OK.

RunOracle

As you can see, we retrieve the output of this Oracle procedure because we have SQL code which fetches the result-set from the JDBC driver.
For situations when you run just a simple procedure with no output, DataGrip will generate SQL code by just running this procedure. Again, you’ll need to add the values to the parameters. Here’s a PostgreSQL example.

Untitled-3

Note that you can run the procedure by clicking the Run button in the toolbar when opening the source code.

Source code migrations

Now, to update the source code of any other objects, just double-click them and make the needed changes. The gutter (the vertical bar to the left of the text editor) will highlight the changes you’ve made. Note also the new Submit button on the toolbar.

MigrationButtons

After you click Commit, the migration dialog will show the generated SQL code to update the source code.

MigrationDialog

Query plan diagram

A diagram-based view is now available for the query plan.

ExplainGraphics

To view it, click the Show Visualization button on the toolbar after you invoke Explain Plan. As a reminder, it’s also available in the context menu for queries in the SQL console.

ExplainButton

SQL editing

Context info

When editing a huge procedure in a package, it is sometimes useful to refresh your memory on its context, i.e. what particular procedure or package is now being edited. To do this, press Alt+Q (Shift+Ctrl+Q for OSX) to see the context information:

Context

Jump outside closing bracket/quote with Tab

Starting with this version, you can navigate outside the closing brackets, or closing quotes, by pressing Tab. Note this works only when inputting parameters or values for the first time.

JumpOutside

To customize this behavior of Tab, go to Preferences | Editor | General | Smart keys and select Jump outside closing brackets/quote with Tab.

SmartKeysSetting

Data editor

Column comments in tooltips

Pretty self-explanatory :)

CommentsColumns

Number of selected rows

Now DataGrip shows the number of rows selected in the data editor. Look for this in the status bar.

Cells

UI upgrades

Touch Bar support

We’ve added support for the MacBook Touch Bar. It only has an Execute button by default.

TouchBar1270

To add actions, go to Preferences → Appearance & Behavior → Menus and Toolbars → Touch Bar.

TouchBarSetting

Assign a shortcut from Find Action

Previously, it was impossible to assign a shortcut from the Find Action if using the Default keymap. We’ve fixed this bug and now it works in any keymap and any layout. A good reason to remind you that it’s possible!

AssignShortcut

Custom data source

Now you can add custom data sources based on jdbc-driver. Click the + button on the toolbar and select the appropriate item from the drop-down.

Driver

Run SQL on a schema

Before, the only way to run the script was by executing it from the context menu of the corresponding SQL file. Now you can use a more intuitive way: choose the datasource or the database you need and select Run SQL script from the context menu.

RunSQLSCript

Dialect and console choosers

Now you can choose the dialect of the SQL file and attach any console to it just from the toolbar.

ChooseDialect

Dark window headers

Now you can make the Darcula theme even darker. If you are on a macOS, to darken the title bars, just go to Preferences → Appearance & Behavior → Appearance and select Use dark window headers.

DarkHeaders

Important bug fixes

DBE-6681: MySQL comments are being formatted properly.
DBE-5204: DDL for a table opens in a right place.
DBE-1858: Deleting the criteria from the Filter field shows all rows in the data editor.
DBE-6436: Backspace doesn’t break quick search in Structure View.
DBE-6362: Views with no schema binding in Redshift are shown in the database tree.
DBE-6469: Record count in data editor works if sorting applied.
IDEA-189650: IDE opens empty files after restart.

The only thing left to do now is to grab your 30-day trial of DataGrip.
Don’t forget about twitter, forum, and the issue tracker.
Your DataGrip Team
_
JetBrains
The Drive to Develop

Posted in Releases | Tagged | 12 Comments

DataGrip 2018.2 EAP 3

Hello! We’ve prepared a new build for our early adopters. Here’s a list of interesting things you will find inside.

Running stored procedures

A long-awaited feature! Now it’s implemented for Oracle and PostgreSQL. SQL Servers procedures are to come.

Choose Execute from the context menu of the procedure.

ExecuteProc

The SQL code will be generated. Put in the values of the parameters you need and press OK.

RunOracle

As you see, we deal with the output of this Oracle procedure, that’s because we have SQL code which retrieves the result-set from the JDBC driver.

In the cases where you run just a simple procedure with no output, DataGrip will generate SQL code just running this procedure. Again, you’ll need to add the values to the parameters. This is a PostgreSQL example.

RunPostgreSQL

Note, that you can run the procedure by clicking on a button in the toolbar when opening the source code.

Code style per data source

As you perhaps already know, you can create different schemes of Code Style.

ActionsOnCodeStyle

Now any of them can be used specifically for each data source. To do this, go to the Options tab of the data source properties.

SetCodeStyle

That’s all for today. Take DataGrip 2018.2 EAP for a spin!

Your DataGrip Team

Posted in Uncategorized | 8 Comments

Using BigQuery from IntelliJ-based IDE

Continuing the series of posts on how to connect DataGrip (or any other IntelliJ-based IDE) to various data sources, in this post we’ll show you how to connect to Google’s BigQuery. BigQuery is a low-cost enterprise data warehouse designed to handle data analytics at a massive scale.

Currently, DataGrip does not come with a built-in connector for BigQuery, so let’s connect the IDE to it.

First, let’s get all the details needed to connect to BigQuery from the Cloud Console. Make sure you have the right project selected, then click on the Create service account button. Type the name of the account, for example “datagrip”, in the Role section, select the BigQuery | BigQuery Data View, BigQuery | BigQuery Job User, and BigQuery | BigQuery User roles, then check the Furnish a new private key box. Make sure that the Key Type is set to JSON, then click on the Create button. A credentials file will be downloaded and you can click on the Close button on the dialog.

Note: Make sure you place that file in a safe place as it will allow anything with rights to read it to connect to your BigQuery dataset you are allowed to access.

DataGrip - BigQuery - Google Cloud Console

Now, back to the IDE, we need to add a new Data Source. Go to Database Tool Window, then select Data Source Properties, click on the “+” button and then, at the bottom of the list you’ll see an entry named Driver, click on this.

Start by changing the name of the configuration to “BigQuery”. You will notice that there is a section called Driver files. You can download the BigQuery JDBC driver from this page. Download the “JDBC 4.2-compatible” zip file, named “SimbaJDBCDriverforGoogleBigQuery42_1.1.6.1006.zip” at the time of writing, then unpack it into a new directory.

Once you downloaded the driver, go back to the IDE, and in the Additional files section, click on “+” and add all the “.jar” files from the newly created directory. Under the Class drop-down, now you can select “com.simba.googlebigquery.jdbc42.Driver” from it. In the Dialect drop-down, select Generic SQL.

Next, let’s define the connection URL template. Click on the “+” button under the URL templates section and add a new entry named “default” with the value: “jdbc:bigquery://[{host::https\://www.googleapis.com/bigquery/v2}[:{port::443}]][<;,{:identifier}={:param}>]”. Go to the Advanced tab, and in the OAuthType field, type “0”(zero).

DataGrip - BigQuery - Driver Config

With the driver is configured, go to the “+” sign at the top left of the Data Sources and Drivers window and select “BigQuery”. Leave the User and Password fields empty.
If you don’t want to modify the data in BigQuery, or your user can only view the data without modifying it, then mark the connection as Read-only.

Click on the Advanced tab and add your service account to OAuthServiceAcctEmail. This is the email we have from the earlier step in the Google Cloud Console. In the OAuthPvtKeyPath type the path to the file downloaded earlier from the Cloud Console. Finally, type the project id in the ProjectId field.

Go back to the General tab, click on the Test Connection button and you should see a “Successful” message. This means you configured everything correctly and you can now connect to BigQuery.

Close the window by pressing the OK button, and now you’ll be presented with a database console ready for use.

DataGrip - BigQuery - Connection Config

Let’s run a few sample queries to see how everything. For this, we’ll use the BigQuery public dataset available, and borrow one query from the official documentation:

Press CTRL+ENTER and the query will start running.

Note: Every time you run a query against BigQuery which requires it to process data, you will pay for it. Make sure that you understand the data size and the query you are about to run before doing so. For more details about the pricing, please see the official BigQuery documentation or contact your Google Cloud administrators.

DataGrip - BigQuery - Run Query

And that’s it. Now you can use BigQuery just like any other database and have all the IDE power for completion, data export, and visualization. Please let us know in the comments below if you have any questions, or features requests, we look forward to your feedback.

Posted in Uncategorized | 6 Comments

DataGrip 2018.2 EAP 2

Hello! Now is a good time to take a look at the new EAP build for 2018.2 which will be released later this month. It comes with one notable feature and several bug-fixes.

Context info

When editing a huge procedure in a package, it is sometimes useful to refresh your memory on the context of it: what particular procedure or package is now being edited. To do this use Alt+Q (Shift+Ctrl+Q for OSX) to see the context information:

Context

Number of selected rows

Now DataGrip will show the number of rows selected in the data editor in the status bar.

Cells

Custom data source

We added the ability to add jdbc-driver based data source to the drop-down invoked by the + button on the toolbar.

Driver

By the way, how do you like our new grayscale toolbar icons? :)

Bug fixes

DBE-6681: MySQL comments are being formatted properly
DBE-5204: DDL for a table opens in a right place
DBE-1858: Deleting the criteria from the Filter field shows all rows in the data editor

That’s it! Don’t forget about Twitter, our forum, and the issue tracker.
Your DataGrip Team
_
JetBrains
The Drive to Develop

Posted in Uncategorized | Tagged | 8 Comments

DataGrip 2018.2 EAP is Open

For those eager for the newest things, we invite you to try an Early Access Program for DataGrip 2018.2. As many of you know, these builds don’t require a license as we want to encourage everybody to try the new features out before the official release.

DataGrip@2x_splash_2018_EAP_preview

New SQL formatter

Thanks to everyone who shared their ideas, we hope that now DataGrip will be able to meet the needs of lots more different code styles. This is a feature we strongly need feedback on, so, please, try out our new formatter and tell us if your specific cases are not covered. We are still working on new clauses to add . The start of the EAP program is the best moment to make DataGrip better!

Formatter

SQL Log

First of all, now you’ll see every query that DataGrip runs in the console output. Whether it’s a user’s SQL or something DataGrip needs to run internally: check the Output tab to understand what’s going on.

SQLLogConsoleOutput

Secondly, literally all queries from the IDE are now logged in a text file.

SQLLogFileTo open this file go to Help -> Show SQL log.

SQLLogShowInFinder

Source code migrations

Now, to update the source code of any of the other objects just double-click on them and make the needed changes. The gutter (the panel to the left of the text editor) will highlight the changes you’ve made. Pay attention to the toolbar: now there is Commit button.

MigrationButtons

Once you’ve pressed Commit, the migration dialog appears. The SQL code to update the source code is generated there.

MigrationDialog

Query plan diagram

A diagram-based view is now available for the query plan.

ExplainGraphics

To view it, press the button on the toolbar after you invoke Explain Plan action. Let us remind you, that it’s available in the context menu of the query in the SQL console.

ExplainButton

Run SQL on a schema

Before, the only way to run the script was executing it from the context menu of the corresponding SQL file. Now you can use a more intuitive way: choose the datasource or the database you need and invoke Run SQL script from the context menu.

RunSQLSCript

That’s all for today! The release is going to be interesting, isn’t it?
DataGrip team.

Posted in Uncategorized | Tagged | 5 Comments

DataGrip 2018.1.5

Hello! Before we start our EAP program for 2018.2, let us bring you a new minor update for 2018.1. Here’s the list of bug-fixes:

DBE-6502: YAML plugin is included in DataGrip.
DBE-6537: Now you can drag-and-drop database elements to Favorites.
DBE-6551: Data source colors work fine after project re-opening.
DBE-6544: POJO-generator works for views as well.
IDEA-191807: Now you can paste file into Scratches folder.

That’s it! Stay tuned!

DataGrip team.

Posted in Uncategorized | 4 Comments