csv-to-influxdb icon indicating copy to clipboard operation
csv-to-influxdb copied to clipboard

Support reading timestamps in epoc format

Open ftylitak opened this issue 3 years ago • 1 comments

Support reading timestamps in epoc format in the time field, applying the required multiplier for the value to always be in nanoseconds.

Through "-te" option, user can pass the percision of the epoch time. When the timecolumn is parsed, the appropriate multiplier will be applied to always end up in nanoseconds that are required by influxdb.

ftylitak avatar Apr 07 '22 11:04 ftylitak

Your script is ok for epoch timestamp format, but not work for native timestamp data.

I get this error with your script that work with original scripst by Miranda.

timestamp = int(row[timecolumn]) ValueError: invalid literal for int() with base 10: '2022-09-01 00:00:00'

fcattaneo2 avatar Nov 30 '22 17:11 fcattaneo2