How to Set Server Output on in Datagrip

Use dbms_output.put_line in Datagrip for .sql files

Turn on this setting in the Output pane: Sample Image

Is there a way to configure data grip to convert 'ssf' into 'select * from'

Good news, it is possible to configure DataGrip to replace a specific string with and expanded string! What other editors (Sublime, VS Code, SSMS, Azure Data Studio, MySQL Workbench) call "snippets," DataGrip and other JetBrains products call "Live Templates" as described for WebStorm here.

There is an existing snippet for what you ask to do, which when expanded will also leave the cursor in the correct location for you to immediately start entering the desired source.

As @moscas mentions in his answer, the live template sel is what you are looking for.

When sel is typed, followed by Tab (or what your DataGrip "By default expand with" setting is) sel will expand to

> `SELECT * FROM ...;`

The cursor will be where the ellipsis (...) is after the expansion. Other useful existing templates are listed here and I recommend building muscle memory for selc and selw. I also created a selt for SELECT TOP(10) * FROM ...; and you should be able to create a new one with using the ssf string using resources linked.

Here are the other default snippets/Live Templates that ship with DataGrip and expand with default expansion:

+---------------------------------------------------------------+
| Abbreviation | Expands to |
+---------------------------------------------------------------+
| ins | INSERT INTO ... (...) VALUES (...);" |
| sel | SELECT * FROM ...;" |
| selc | SELECT count(*) FROM ... alias WHERE alias. ...;" |
| selw | SELECT * FROM ... alias WHERE alias. ...;" |
| upd | UPDATE ... SET ... = ... WHERE ...;" |
+---------------------------------------------------------------+

How to set datagrip to take same timezone as the host database

You need the time zone setting in the properties of the connection.

Sample Image

how do I use my local drive folder as data source in datagrip?

You can right click on the schema and click on import data from file like below. You will see a window pop up where you specify separators, headers, etc along with a preview.
Sample Image



Related Topics



Leave a reply



Submit