A string like "ABCDEFG" isn't allowed here ERROR when using CSV variables with DQL on dashboards v2.0

hi all,

when using a list of variables with CSV option that references hypervisors and ESXI host tags, i get this error on DQL query:

--A string like “xxxx” isn’t allowed here. Please check the autocomplete suggestions before the error for alternative options.

MariettaAlmeida_0-1725029007468.png

i’ve tried 2 ways of doing this, the first one launched the error mentiones above:

MariettaAlmeida_1-1725029100374.png

the second atempt shows he cpu comsuption by cluster which is the needed metric but i cant select by variable, how can i do that’

timeseries usage = avg(dt.cloud.vmware.hypervisor.cpu.usage), by: { dt.entity.hypervisor },
filter: { in(dt.entity.hypervisor, classicEntitySelector("type(hypervisor), tag(\“vmware:PrXXXXXXX\”) ")) }
| fieldsAdd entityName(dt.entity.hypervisor), usage = arrayAvg(usage)
| sort usage desc

thank you in advance :slightly_smiling_face:

Using native DQL syntax it can be achieved this way…

I defined variable to match my demo data:

and DQL query taking this variable as input to filtering by tag looks like this:

fetch dt.entity.hypervisor
| fieldsAdd tags
| filter iAny( tags[] == concat("SYNCED_AIT:",$Cluster))

It is also possible to use concat() function together with classicEntitySelector():

fetch dt.entity.hypervisor
| fieldsAdd tags
| filter in(id, classicEntitySelector(concat("type(hypervisor), tag(\"SYNCED_AIT:",$Cluster,"\")")))