【发布时间】:2019-08-25 06:28:23
【问题描述】:
我有一个带有一组 PTransforms 的管道,我的方法变得很长。
我想将我的 DoFns 和我的复合变换写在一个单独的包中,然后在我的 main 方法中使用它们。使用 python 非常简单,如何使用 Scio 来实现?我没有看到任何这样做的例子。 :(
withFixedWindows(
FIXED_WINDOW_DURATION,
options = WindowOptions(
trigger = groupedWithinTrigger,
timestampCombiner = TimestampCombiner.END_OF_WINDOW,
accumulationMode = AccumulationMode.ACCUMULATING_FIRED_PANES,
allowedLateness = Duration.ZERO
)
)
.sumByKey
// How to write this in an another file and use it here?
.transform("Format Output") {
_
.withWindow[IntervalWindow]
.withTimestamp
}
【问题讨论】:
标签: scala apache-beam spotify-scio