csv-to-influxdb
csv-to-influxdb copied to clipboard
Support reading timestamps in epoc format
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.
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'