How to stop datagrip asking me to input variables when I mean to select items from json instead?

I'm using databricks sql which enables me to write this:

SELECT item:id FROM table

The intended result is to select the id field from as json string, but I can't get it to run as DataGrip interprets this as me wanting to specify a variable and gives me a popup.

Is there a way to disable the popup and interet it as I specified? This would re-enable my use of DataGrip as I've been without it for a while because of this problem.

Thanks in advance!

评论操作 固定链接
Hi Nick,

Thank you for contacting us.

Currently, we don't have complete or basic support for Databricks JDBC drivers, which may prevent certain vendor-specific functionality from working properly. We have added a feature request for Databricks support:

https://youtrack.jetbrains.com/issue/DBE-16740/Databricks-support-in-Datagrip

As a workaround, please try using space between key:value pair when quering specific JSON values as follows:

SELECT item :id FROM table;
0
评论操作 固定链接

Hi Aleksandr- thanks for the response. Databricks support would be great. Unfortunately the workaround doesn't appear to work for me, I'm still faced with the popup.

0
评论操作 固定链接
Hi Nick,

Apologies for getting to you back so late.

The issue is currently under research and is being investigated as we speak. We'll need more time to review our results and provide you with a solution.

We'll keep you updated throughout the course.
0
评论操作 固定链接

Thank you for being so patient.

You can try the following workarounds:

1. Switch to Generic SQL dialect in File | Settings | Database | SQL Dialects. There you need to specify the scope, either project or global-wide. You may alternatively create a SQL file from New - SQL File, Generic SQL, and try to run the query from there. However, using Generic SQL may impose limitations on other SQL dialect-specific possibilities.

2. You could specify the JSON value after the colin in the input value, as shown on the screenshot below. To remember the values you queried, please disable Review Parameters Before Execution option in File | Settings | Database | Query Execution. When querying this element next time, you won't be asked to enter it again.



Please let me know if you have questions.

0

请先登录再写评论。