I want to use two different JSNOata expressions depenendant on Dashboard Variable

Hi, I am using the Infinity Datasource in Grafana. It is configured as follows:

  • Query Type: Infinity
  • Type: JSON
  • Parser: Backend
  • Source: URL
  • Method: GET
  • URL: [your URL here]

In the “Parsing Options & Result fields” section, I need a JSONata expression that retrieves IDs from my datasource. I have a dashboard variable that is determined within the dashboard. Depending on this variable, I want to execute two different JSONata queries. It is important that these two JSONata queries are within one datasource.

welcome @timod

please share sample json data

Hi, I can not share the data due to restrictions, the two queries individually work fine, I just need the structure to combine them in one field and differentiate depending on the variable.

sorry can’t help you without sample data. maybe even obfuscated data but with json structure intact.

here is docu for infinity

https://grafana.github.io/grafana-infinity-datasource/docs/uql