Filters not working

I’m using Infinity datasource plugin. While trying to define a variable, these problems arise. The rest of the variables are correctly set and working. Is there any known bug with these filters?
If I use Default parser, it doesn’t allow me to choose tierName:


If I use Backend parser, this doesn’t work:

I would recommend you use UQL please share sample csv,json data

please clean it up and post proper json format not of your dashboard but the data you are trying to filter?

{
	"type": "Feature",
	"id": "SVK",
	"properties": {
		"name": "Slovakia"
	}
}

you have odd “time”: quotation marks and all
Also vet out the validity of the json before posting it like on https://jsonformatter.curiousconcept.com/#?

1 Like
[
   {
      "appAgentVersion":"Server Agent abc",
      "machineAgentVersion":"Machine Agent abc",
      "agentType":"APP_AGENT",
      "type":"Other",
      "machineName":"abc",
      "appAgentPresent":true,
      "nodeUniqueLocalId":"",
      "machineId":111,
      "machineOSType":"Linux",
      "tierId":111,
      "tierName":"aaa",
      "machineAgentPresent":true,
      "name":"aaa",
      "ipAddresses":null,
      "id":111
   },
   {
      "appAgentVersion":"Server Agent abc",
      "machineAgentVersion":"Machine Agent abc",
      "agentType":"APP_AGENT",
      "type":"Other",
      "machineName":"abc",
      "appAgentPresent":true,
      "nodeUniqueLocalId":"",
      "machineId":111,
      "machineOSType":"Linux",
      "tierId":111,
      "tierName":"aaa",
      "machineAgentPresent":true,
      "name":"aaa",
      "ipAddresses":null,
      "id":111
   }
]
1 Like

using UQL

parse-json
| where "tierName" == '${tiers}'

I’m afraid it didn’t work, either.


(URL obfuscated on purpose)

1 Like

is this a variable?

Yes, it is. And the data comes from an HTTP GET request.

1 Like

which data point do you want returned from the json data?

parse-json
| jsonata "($muzak := $filter($, function($v, $i, $a) {$v.tierName =  '${tiers}' }); $muzak.machineName)"

play around with it

:fish: :fishing_pole_and_fish:

1 Like

It worked! Thanks a lot!

1 Like