哪种 csv 格式适合 influxdb2?

发布于 2025-01-20 23:26:43 字数 628 浏览 4 评论 0原文

我将使用infuxdb v2.1将CSV文件放入存储桶中。

尝试插入一个简单的示例文件会导致以下错误:

error in csv.from(): failed to read metadata: failed to read annotations: expected annotation datatype

我要编写的CSV文件如下。

#datatype measurement,tag,double,dateTime:RFC3339
m,host,used_percent,time
mem,host1,64.23,2020-01-01T00:00:00Z
mem,host2,72.01,2020-01-01T00:00:00Z
mem,host1,62.61,2020-01-01T00:00:10Z
mem,host2,72.98,2020-01-01T00:00:10Z
mem,host1,63.40,2020-01-01T00:00:20Z
mem,host2,73.77,2020-01-01T00:00:20Z

这是Influxdata官方文件中的示例数据。

如果您查看示例的第一行,您可以看到数据类型是注释的,但是为什么发生错误?

我应该如何修改它?

I'm going to put the csv file into the bucket using influxdb v2.1.

Attempting to insert a simple example file results in the following error:

error in csv.from(): failed to read metadata: failed to read annotations: expected annotation datatype

The csv file that I was going to write is as follows.

#datatype measurement,tag,double,dateTime:RFC3339
m,host,used_percent,time
mem,host1,64.23,2020-01-01T00:00:00Z
mem,host2,72.01,2020-01-01T00:00:00Z
mem,host1,62.61,2020-01-01T00:00:10Z
mem,host2,72.98,2020-01-01T00:00:10Z
mem,host1,63.40,2020-01-01T00:00:20Z
mem,host2,73.77,2020-01-01T00:00:20Z

This is the example data in the official document of influxdata.

If you look at the first line of the example, you can see that datatype is annotated, but why does the error occur?

How should I modify it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人 2025-01-27 23:26:43

这看起来像是无效的带注释的 CVS。

csv.from 函数文档中,您可以找到cvs.from 支持的带注释的 CVS 和原始 CVS 的示例(作为字符串文字)。

This looks like invalid annotated CVS.

In the csv.from function documentation, you can find examples (as string literals) of both annotated and raw CVS that the cvs.from supports.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文