Source Transform namespace for transforming data at the source level.
Source transforms allow you to modify messages immediately after they are read from a source, before they enter the main pipeline. This is useful for tasks like:
import { sourceTransform } from '@numaproj/numaflow-js';const server = new sourceTransform.AsyncServer(async (datum) => { const data = JSON.parse(datum.value.toString()); const eventTime = new Date(data.timestamp); return [new sourceTransform.Message(datum.value, eventTime, { keys: [data.id] })];});server.start(); Copy
import { sourceTransform } from '@numaproj/numaflow-js';const server = new sourceTransform.AsyncServer(async (datum) => { const data = JSON.parse(datum.value.toString()); const eventTime = new Date(data.timestamp); return [new sourceTransform.Message(datum.value, eventTime, { keys: [data.id] })];});server.start();
Source Transform namespace for transforming data at the source level.
Source transforms allow you to modify messages immediately after they are read from a source, before they enter the main pipeline. This is useful for tasks like:
Example