如何在尝试使用一个呼叫中插入InfluxDB中的用户定义数据列表的所有元素中添加不同的标签
我正在尝试在InfluxDB服务器中插入用户定义的数据类别的整个列表,并为每个列表提供不同的标签,同时还使用单个写入调用。我正在使用aioinflux。
这可能吗?
到目前为止,我一直在看 aioinflux.influxdbclient
's 写入函数。
我看到它具有 tag_columns
参数,但是文档表明它只能与DataFrames一起使用。然后是 extair_tag
参数,但是由于我想使用 使用 单个写下呼叫,因此该方法在这种情况。
有什么想法吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
extair_tags 参数对用户定义的数据级对象没有影响。
进行了一些随机搜索后,我发现此表这表明可以通过将标签组成数据级别的一部分来向每个数据点添加标签。这样,就可以插入dataclasses 和的估计性,请确保它们具有标签。
I was waylaid by how the write function is structured. Basically, it seems that its
extra_tags
argument has no effect on user-defined dataclass objects.After doing a little bit of random searching I found out this table which suggests that one can add tags to each datapoint by making the tags part of the dataclass. This way, one can insert an Iterable of dataclasses and make sure that they have tags.