0
上下文:我正在阅读文件,其中多个字段是ID列表。我需要将这些字段转换为管道以将它们与其他管道连接起来。在Seal中将Seq转换为管道
我曾尝试:
val otherPipe = pipe
.project('fieldIwant)
.map { p: Pipe => p.toString.split(",") } // converts pipe -> array
.unique
上下文:我正在阅读文件,其中多个字段是ID列表。我需要将这些字段转换为管道以将它们与其他管道连接起来。在Seal中将Seq转换为管道
我曾尝试:
val otherPipe = pipe
.project('fieldIwant)
.map { p: Pipe => p.toString.split(",") } // converts pipe -> array
.unique
您可以从收集利用得到TypedPipe:
TypedPipe.from(Seq(1, 2, 3, 4, 555, 3))
如果需要退回到FieldsAPI(这是不建议使用),你可以使用
TypedPipe.from(Seq(1, 2, 3, 4, 555, 3)).toPipe('fieldName)