Skip to content

data in EventTransform is always null #8827

Description

@sebastienblanc

Describe the bug
I have : KafkaSource -> EventTransform -> Kafka Broker -> Trigger -> Sink (Knative Service)

My Event Transform is to extract a field from dataas Cloud Event attribute :

 apiVersion: eventing.knative.dev/v1alpha1
kind: EventTransform
metadata:
  name: simple-transform
spec:
  sink:
    ref:
      apiVersion: eventing.knative.dev/v1
      kind: Broker
      name: agent-broker
  jsonata:
    expression: |
      {
        "specversion": "1.0",
        "id": id,
        "time": time,
        "type": type,
        "source": source,
        "mycustomfield": "customvalue",
        "targetagent": data.target,
        "data": $
      }

KafaSource is reading this record from kafka :

{"target":"chatbot"}

But data is always null in the Event Transform, also "data": $ copies the entire cloud event (with an empty data) , here an record example from the internal kafka broker topic :

{"id":"partition:0/offset:55","time":"2025-12-19T07:19:05.531Z","type":"dev.knative.kafka.event","source":"/apis/v1/namespaces/scm-blanc-dev/kafkasources/kafka-source#agents","specversion":"1.0","subject":"partition:0#55","data":{},"knativekafkapartition":"0","knativekafkaoffset":"55"}

Expected behavior
datashould not be null and $ should only copy the payload.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions