Export to line protocol looses precision

Hi there,

I am trying to export my database to line protocol to make some changes to tags in there to reimport it again.

I’ve stumbled upon the command

influxd inspect export-lp --bucket-id xxx --output-path xxx

which does exactly what I want - but as I’ve looked into the file, in some lines larger values are loosing precision, like “measurement,tag1=t1,tag2=t2 field1=1.9015e+06 1632668504483000000”.

If I will reimport the file again, I will loose 2 digits of precision (in this example). Is there any way to trigger the export without loosing precision? Or is there a better way to “re-tag” a slice of data in influx?

Thanks for any hints!

@ralphp this sounds like a bug in the export-lp code to me. I’ll double-check the code and file an issue if so.

You might be able to use a Flux query to perform your data transformation. Something roughly like:

  1. from |> range to select the data slice from your source bucket
  2. A series of map calls to modify your tags
  3. A final to call to write the data back to the target bucket
1 Like

@ralphp I don’t see any obvious problems looking through the export-lp or ingest code. In your example, what did you expect the exported timestamp to be (as opposed to the actually-exported value of 1632668504483000000)?

Interesting, do you mean that the precision is correct for some/most of the records , and only some are loosing precision?

Can you find and reply with a few examples (5-10) with both the correct/original timestamp and the wrong/exported timestamp. I’m curious what patterns show up.