Documentation

join.time() 函数

join.time() 将两个表流仅在 _time 列上连接在一起。

此函数调用 join.tables() ,并将 on 参数设置为 (l, r) => l._time == r._time

函数类型签名
(
    <-left: stream[{A with _time: B}],
    as: (l: {A with _time: B}, r: {C with _time: D}) => E,
    right: stream[{C with _time: D}],
    ?method: string,
) => stream[E] where B: Equatable, D: Equatable, E: Record

有关更多信息,请参见 Function type signatures

参数

左输入流。默认是输送前的数据 (<-).

(必填) 正确的输入流。

作为

(必需) 一个接受左侧和右侧记录(lr 分别)的函数,并返回一个记录。 返回的记录包含在最终输出中。

方法

指定连接方法的字符串。默认值是 inner

支持的方法:

  • 内部
  • 完整的

示例

通过时间戳连接两个表

import "sampledata"
import "join"

ints = sampledata.int()
strings = sampledata.string()

join.time(left: ints, right: strings, as: (l, r) => ({l with label: r._value}))

查看示例输出



Flux的未来

Flux 正在进入维护模式。您可以像现在一样继续使用它,而无需对您的代码进行任何更改。

阅读更多

InfluxDB 3 开源版本现已公开Alpha测试

InfluxDB 3 Open Source is now available for alpha testing, licensed under MIT or Apache 2 licensing.

我们将发布两个产品作为测试版的一部分。

InfluxDB 3 核心,是我们新的开源产品。 它是一个用于时间序列和事件数据的实时数据引擎。 InfluxDB 3 企业版是建立在核心基础之上的商业版本,增加了历史查询能力、读取副本、高可用性、可扩展性和细粒度安全性。

有关如何开始的更多信息,请查看: