Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createTransformPipeline(
transforms: DatasetTransform[],
ds: DatasetManager,
): Pipeline {
const df = new Dataflow()
const entry = df.add(collect)
let latest = entry
transforms.forEach(t => {
latest = t.build(df, latest, ds)
latest = df.add(collect, { pulse: latest })
})
return {
dataflow: df,
start: entry,
end: latest,
}
}