apiVersion: eventing.knative.dev/v1alpha1
kind: EventTransform
metadata:
name: event-enricher
spec:
jsonata:
expression: |
{
"specversion": "1.0",
"id": id, /* Add the "id", "type", "source", and "time" attributes based on the input JSON object fields */
"type": type,
"source": source,
"time": time,
"environment": "production", /* Add fixed environment and region attributes to the event metadata */
"region": "us-west-1",
"data": $ /* Add the event transform input JSON body as CloudEvent "data" field */
}
apiVersion: eventing.knative.dev/v1alpha1
kind: EventTransform
metadata:name: event-enricher
spec:jsonata:expression:|
{
"specversion": "1.0",
"id": id, /* Add the "id", "type", "source", and "time" attributes based on the input JSON object fields */
"type": type,
"source": source,
"time": time,
"environment": "production", /* Add fixed environment and region attributes to the event metadata */
"region": "us-west-1",
"data": $ /* Add the event transform input JSON body as CloudEvent "data" field */
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow