Skip to content

Commit

Permalink
doc: add json transformation example
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Mar 4, 2024
1 parent 73c2ad5 commit 59238ca
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions example/config-ping-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: sources.knative.dev/v1
kind: PingSource
metadata:
name: ps-transformation-demo
spec:
schedule: "*/1 * * * *"
contentType: "application/json"
data: '{
"salesorderNumber":"A000003769",
"soldToId":"0000469010",
"shipToId":"0000469010",
"endCustomerId":"0000469010",
"emailAddress":"no-reply@zeiss.com",
"salesOrganisation":"0305",
"senderBusinessSystemId":"Q8E_010_Q_ERP",
"positions":[
{
"position":"000070",
"materialNumber":"000000000001983899",
"quantity":1,
"durationInDays":0,
"ibaseSerialNumber":"",
"ibaseMaterialNumber":"",
"plant":"6101",
"selected":true
}
]
}'
sink:
ref:
apiVersion: flow.typhoon.zeiss.com/v1alpha1
kind: Transformation
name: trn-transformation-demo

---

apiVersion: flow.typhoon.zeiss.com/v1alpha1
kind: Transformation
metadata:
name: trn-transformation-demo
spec:
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-success-capture
namespace: default

context:
- operation: store
paths:
- key: $time
value: time
- key: $id
value: id
- operation: add
paths:
- key: id
value: $person-$id
- key: type
value: com.zeiss.typhoon.transformation.pingsource

data:
- operation: add
paths:
- key: event.ID
value: $id
- key: event.time
value: $time
- operation: shift
paths:
- key: senderBusinessSystemId:senderId
- operation: delete
paths:
- key: emailAddress

0 comments on commit 59238ca

Please sign in to comment.