Line protocol can't catch boolean

Following Line protocol | InfluxDB OSS 2.0 Documentation document,
I added data like below
(quoting string values, don’t quoting boolean values)

played,project_id=1,device="Desktop",country="US",actioned=true play_id="z6I1bbbz" 1630370554909646000

But it works weird.

string values have quote in its value like ““US””, not “US”.
no boolean values like “true”, not true

The spacial cahracters handling varies up to the section, you got measurement, tags, and values.

see the docs

Line protocol accepts double and single quotes in measurement names, tag keys, tag values, and field keys, but interprets them as part of the name, key, or value.

In your case, you are referring to tag values, and tags are always and only saved as strings. (no matter if numbers, booleans, or whatever, it will be stored as a string), and as stated above quotes will be part of the value itself.

1 Like