InfluxDB 1.8:将测量数据导出到CSV,更改和进口数据
使用
influx -database 'myDatabase' -execute 'SELECT * from myMeasurement' -format csv > Influxdata.csv
i将所有mymeasurements值导出到CSV文件。
我更改了CSV文件中的一些值(标签名称更改)。 现在,我需要将更改的数据导入Mymesaurement。
有什么办法吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,您将不得不手动将该CSV手动转换为“导入”喜欢的格式。
非常有用,但是它们提供的示例非常有限。在值和时间戳被空间分离之前,所有字段都需要进行逗号分隔。例如:
然后用类似命令的命令导入,根据时间戳的精度进行调整以及文件的详细信息:
As far as I can tell, you're going to have to manually convert that csv into the format import likes.
https://docs.influxdata.com/influxdb/v1.8/tools/shell/#import-data-from-a-file-with--import is quite useful, but the example they supply is quite limited. All the fields need to be comma-separated before the value and the timestamp are separated by spaces. E.g.:
Then import that with a command like, adjusted for the precision of your timestamps and the details of your file: