tableFind() 函数
tableFind()
提取流中第一个具有与指定谓词匹配的组键值的表。
函数类型签名
(<-tables: stream[B], fn: (key: A) => bool) => stream[B] where A: Record, B: Record
有关更多信息,请参阅 函数类型签名。
参数
fn
(必需) 用于评估输入表组键的谓词函数。
tableFind()
返回第一个解析为 true
的表。谓词函数需要一个 key
参数,该参数将每个输入表的组键表示为记录。
tables
输入数据。 默认为管道转发数据 (<-
)。
示例
从表流中提取表
import "sampledata"
t =
sampledata.int()
|> tableFind(
fn: (key) => key.tag == "t2",
)// t represents the first table in a stream whose group key
// contains "tag" with a value of "t2".
此页面是否对您有帮助?
感谢您的反馈!