You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/sources/transformer/overview.md
+131-3Lines changed: 131 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,9 +66,137 @@ func main() {
66
66
67
67
Check the links below to see another transformer example in various programming languages, where we apply conditional forwarding based on the input event time.
- [Python full example on numaflow-python on Github](https://github.com/numaproj/numaflow-python/blob/main/packages/pynumaflow/examples/sourcetransform/event_time_filter/example.py)
} else if (eventTime.isBefore(januaryFirst2023)) {
177
+
return MessageList
178
+
.newBuilder()
179
+
.addMessage(
180
+
new Message(
181
+
data.getValue(),
182
+
januaryFirst2022,
183
+
null,
184
+
new String[]{"within_year_2022"}))
185
+
.build();
186
+
} else {
187
+
return MessageList
188
+
.newBuilder()
189
+
.addMessage(new Message(
190
+
data.getValue(),
191
+
januaryFirst2023,
192
+
null,
193
+
new String[]{"after_year_2022"}))
194
+
.build();
195
+
}
196
+
}
197
+
}
198
+
```
199
+
- [Java full example of numaflow-java on Github](https://github.com/numaproj/numaflow-java/blob/main/examples/src/main/java/io/numaproj/numaflow/examples/sourcetransformer/eventtimefilter/EventTimeFilterFunction.java)
72
200
73
201
After building a docker image for the written transformer, specify the image as below in the source vertex spec.
0 commit comments