Closed vlcinsky closed 1 year ago
This is outside the scope of this client library. The primary focus of this library is to send data into InfluxDB and as such get data into line protocol.
What you are after is essentially:
1621422000000000000
), set the timestamp. If length of 2, no timestamp. Error on other lengths.measurement,tag1=value1,tag2=value2
) take index 0 as the measurement name. If the length is greater than 1, then loop through each and set your tags.Closing as not in plan.
Proposal: Provde a parser for parsing influxdb line protocol lines
Current behavior: Searching the library I have found only parser for parsing CSV.
Desired behavior:
and it shall print (if formatted as JSON):
Alternatives considered: There is https://pypi.org/project/line-protocol-parser/ but it seems not maintained any more and there is an issue with not following spec for the format for special characters.
Use case: Sometime I need to process line protocol without explicitly dealing with InfluxDB, e.g. when i transfer line protocol lines via other means such as mqtt broker.