mullerpeter / databricks-grafana

Grafana Databricks integration allowing direct connection to Databricks to query and visualize Databricks data in Grafana.
Apache License 2.0
55 stars 4 forks source link

Query variable issue #17

Closed keivan68 closed 1 year ago

keivan68 commented 1 year ago

When I want to add a query-based variable to the Grafana dashboard, there is no option to enter the query if Databricks data source is selected. Picture attached.

Screenshot from 2023-03-20 16-45-20

mullerpeter commented 1 year ago

Hi @keivan68! Thanks for opening the issue.

Support for query-based variables was indeed missing. I added it in the latest release.

keivan68 commented 1 year ago

Hi Peter,

Great, thanks for solving this so quickly!

Best, Keivan

On Thu, Mar 23, 2023 at 14:42 Peter Müller @.***> wrote:

Hi @keivan68 https://github.com/keivan68! Thanks for opening the issue.

Support for query-based variables was indeed missing. I added it in the latest release.

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1481951675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUBQGYU5R7ZSFQU7JDLW5S7U5ANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

keivan68 commented 1 year ago

I wonder if it’s also possible to add the support for Databricks Annotations in Grafana.

The Annotations page can be found right next to Variables in the dashboard menu.

On Thu, Mar 23, 2023 at 14:42 Peter Müller @.***> wrote:

Hi @keivan68 https://github.com/keivan68! Thanks for opening the issue.

Support for query-based variables was indeed missing. I added it in the latest release.

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1481951675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUBQGYU5R7ZSFQU7JDLW5S7U5ANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

mullerpeter commented 1 year ago

Sure, annotations should also be supported now. #19

keivan68 commented 1 year ago

Awesome!

On Thu, Mar 23, 2023 at 23:07 Peter Müller @.***> wrote:

Sure, annotations should also be supported now. #19 https://github.com/mullerpeter/databricks-grafana/pull/19

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1482302046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUE6IJW6DIUTBN2NZG3W5U22HANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

keivan68 commented 1 year ago

Hi Peter,

I wonder if filtering tables based on Grafana multi selection variables is possible via the connector.

If multiple values are selected in a variable, the returned value will be like {selection1,selection2} which is not suitable for submitting to Databricks.

Best, Keivan

On Fri, Mar 24, 2023 at 23:39 Keivan Ebrahimi @.***> wrote:

Awesome!

On Thu, Mar 23, 2023 at 23:07 Peter Müller @.***> wrote:

Sure, annotations should also be supported now. #19 https://github.com/mullerpeter/databricks-grafana/pull/19

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1482302046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUE6IJW6DIUTBN2NZG3W5U22HANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

mullerpeter commented 1 year ago

Can you give me an example of a query you are trying to build? Or explain how the plugin should handle multiple variables so that it would work for your use case?

Also have you looked at Advanced Variable Format Options?

keivan68 commented 1 year ago

Yep, I could not find the solution there.

Here is a sample query with the error in Grafana (partNumber is a multi-selection variable): [image: image.png]

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

On Thu, Apr 6, 2023 at 2:41 AM Peter Müller @.***> wrote:

Can you give me an example of a query you are trying to build? Or explain how the plugin should handle multiple variables so that it would work for your use case?

Also have you looked at Advanced Variable Format Options https://grafana.com/docs/grafana/latest/dashboards/variables/variable-syntax/#advanced-variable-format-options/ ?

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1498775330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUGRCJCVIOSLYOFBMOLW72FSZANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

mullerpeter commented 1 year ago

The attached image is not viewable. Just shows up as [image: image.png]. Could you try uploading it via the WebUI?

keivan68 commented 1 year ago

Hi Peter,

You can find it here: https://www.dropbox.com/s/0u3erl358w01khd/Photo%20Apr%2014%202023%2C%2002%2025%2033.png?dl=0

On Fri, Apr 14, 2023 at 00:45 Peter Müller @.***> wrote:

The attached image is not viewable. Just shows up as [image: image.png]. Could you try uploading it via the WebUI?

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1508075566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUHDWH5GOTCXWBQSCULXBD6ABANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan

mullerpeter commented 1 year ago

I would say the following should work:

partNumber IN (${PartNumber:doublequote})

keivan68 commented 1 year ago

Excellent. That works!

Thank you, Keivan

On Fri, Apr 14, 2023 at 05:27 Peter Müller @.***> wrote:

I would say the following should work:

partNumber IN (${PartNumber:doublequote})

— Reply to this email directly, view it on GitHub https://github.com/mullerpeter/databricks-grafana/issues/17#issuecomment-1508432268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIPUHEHCUIUIQQYC52OITXBE7CNANCNFSM6AAAAAAWBX2PKE . You are receiving this because you were mentioned.Message ID: @.***>

--

Keivan Ebrahimi 6507706476 | KeivanEbrahimi.com | @. @.> @KeivanEbrahimi @.***=tg> https://www.linkedin.com/in/keivanebrahimi/ https://twitter.com/EbrahimiKeivan