"Bad logical expression" on deletion by tag

Hi all,

I would like to delete data with a certain tag (Measurement = House_WO_WP) and I’m using this command:

influx delete --bucket 'ipsymcon/autogen' --start '2018-03-21T07:24:10.000Z' --stop '2022-10-17T20:36:10.000Z' --predicate 'Measurement="House_WO_WP"' --token 'xyz' --host http://192.168.1.43:8089

But this does not work, I get an error:

Error: failed to delete data: 400 Bad Request: invalid request; error parsing request json: bad logical expression, at position 0

I’m using Influx CLI 2.4.0 (git: 5c7c34f)

What is wrong here?

Thanks!
Oliver

Seems to be a bug:

But still, if anyone has a workaround here, this would be much appreciated.

Problem seems to be the tag key beeing named “measurement” which is one of the InfluxDB’s keyword and should therefore be avoided.
Using a double-quote around the tag key solved the problem:
[...] --predicate '"Measurement"=House_WO_WP' [...]

Great job in finding the problem!

I have a similar problem but with deleting °C measurements.
The command from the CLI does not seem to recognize °C,

.\influx delete --bucket homeassistant --start ‘2022-10-03T11:50:00Z’ --stop ‘2022-10-03T13:50:00Z’ --predicate ‘_measurement=“°C” AND entity_id=“dom_temperatura”’ --org dom -token …mytoken…
Error: failed to delete data: 400 Bad Request: invalid request; error parsing request json: bad tag value: “°”, at position 13

Of course, when there is no ° character, delete works fine. Is it a CLI bug or should I write °C differentl?

Same issue for me with OSS 2.6.1 and InfluxQL shell 2.6.1
I have fixed the problem by writting double quotes instead of simple quotes.
In my case :

–predicate “_measurement=“temperature” AND ville=“nice””

instead of

–predicate ‘_measurement=“temperature” AND ville=“nice”’

feat: add examples of escaping predicates for delete by jeffreyssmith2nd · Pull Request #4686 · influxdata/docs-v2 · GitHub is the solution - check README (Predicates with special characters or keywords)