forked from numaproj/numaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11-join-on-sink.yaml
More file actions
52 lines (51 loc) · 1.38 KB
/
11-join-on-sink.yaml
File metadata and controls
52 lines (51 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# A somewhat silly example of how to Join on a Sink Vertex.
# Data is conditionally forwarded to either even-cat or odd-cat, and then all data is re-joined on the Sink Vertex.
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: join-on-sink
spec:
vertices:
- name: in
source:
http: {}
- name: even-or-odd
udf:
container:
# Tell the input number is even or odd, see https://github.com/numaproj/numaflow-go/tree/main/examples/mapper/even_odd
image: quay.io/numaio/numaflow-go/map-even-odd:stable
- name: even-cat
udf:
container:
image: quay.io/numaio/numaflow-go/map-cat:stable # A UDF which simply cats the message
imagePullPolicy: Always
- name: odd-cat
udf:
container:
image: quay.io/numaio/numaflow-go/map-cat:stable # A UDF which simply cats the message
imagePullPolicy: Always
- name: out
sink:
# A simple log printing sink
log: {}
edges:
- from: in
to: even-or-odd
- from: even-or-odd
to: even-cat
conditions:
tags:
operator: or
values:
- even-tag
- from: even-or-odd
to: odd-cat
conditions:
tags:
operator: or
values:
- odd-tag
- from: even-cat
to: out
- from: odd-cat
to: out