timescale / outflux

Export data from InfluxDB to TimescaleDB
Apache License 2.0
92 stars 22 forks source link

cannot convert time column with nanoseconds #49

Open freeznet opened 5 years ago

freeznet commented 5 years ago

trying to use outflux to migrate influxdb data to timescaledb, but when transferring to timescaledb, the time column only have ms precision instead of ns. According to timescaledb docs, the time column should be long int, but how can i create hypertable with outflux to support ns?

atanasovskib commented 5 years ago

Thank you for your feedback. The current implementation of Outflux can create only a timestamp type column for the time dimension. This way TimescaleDB's ability to use a long int for a partitioning column (such as an epoch time with nanoseconds) is not supported.

We will add a configuration option that will allow you to select the type of partitioning column

furushchev commented 2 years ago

Is there any update on this issue? We're also planning to migrate to timescaledb from influxdb and the only concern is precision of timestamp ( microseconds vs nanoseconds )

haydenflinner commented 2 years ago

@furushchev Is there any update on this issue? We're also planning to migrate to timescaledb from influxdb and the only concern is precision of timestamp ( microseconds vs nanoseconds )

It looks like Timescale supports using int types as the 'timestamp' column, but will have to specify chunk_time_interval in a less pretty form, and probably other gotchas will pop up eventually. I think a better solution would be integration (or inclusion of) a blessed extension like https://github.com/fvannee/timestamp9 into TimeScale. Then outflux can use that.