[UQL][CSV] Logical operators in filters

I have tried to use logical operators in filters with the different parsers, but I have not succeeded. is it even possible?

Each of the conditions works separately.

Type: CSV
Method: GET

Parser: Backend

APP =~ "(?i)($SERVICE.*)" AND ENV == "$ENVIRONMENT"
Status: 500. Message: error getting data frame. error applying filter. filter expression for row 0 didn't produce binary result. error: %!w(<nil>). Not applying filter

Parser: UQL

parse-csv
  where "APP" =~ "(?i)($SERVICE.*)" and  "ENV" == "$ENVIRONMENT"
Error Applying UQL query

For uql filters might want to look here, there is no where clause

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

You are right @yosiasz , where clause is for json.

I have checked the information in the link you sent but haven’t seen anything about applying logical operations to a filter. I guess it is not possible, even using Backend Parser.
Can you please confirm this?
Thanks for your quick reply

please post sample csv with proper column names

Just three columns

Environment,Service,Application
DEV,http://dev_enpoint_clients,CLIENTS
STAGE,http://stage_enpoint_clients,CLIENTS
PROD,http://prod_enpoint_clients,CLIENTS
DEV,http://dev_enpoint_register,REGISTER
STAGE,http://stage_enpoint_register,REGISTER
PROD,http://prod_enpoint_register,REGISTER
DEV,http://dev_enpoint_intsg,INTSG
STAGE,http://stage_enpoint_intsg,INTSG
PROD,http://prod_enpoint_intsg,INTSG

Changing “AND” to “&&” has worked.

1 Like