{"id":"ff7289c9-803b-46fd-b829-ac7d8c922809","task":"Use the Kafka Connect HeaderFrom SMT to promote record value fields into message headers before sink delivery","domain":"kafka.apache.org","steps":["Add a transforms entry to the connector config: transforms=promoteHeaders","Set transforms.promoteHeaders.type=org.apache.kafka.connect.transforms.HeaderFrom$Value to operate on the record value","Specify which fields to promote: transforms.promoteHeaders.fields=region,tenant_id and the corresponding header names: transforms.promoteHeaders.headers=x-region,x-tenant","Choose operation mode: transforms.promoteHeaders.operation=copy to leave fields in the value, or move to remove them from the value after promotion","Chain with a downstream SMT if needed: e.g. add a ReplaceField transform after HeaderFrom to drop any fields that should not appear in the sink payload","Validate by consuming a transformed message with kafka-console-consumer.sh --print-headers and confirming x-region and x-tenant headers are present"],"gotchas":["HeaderFrom field names are case-sensitive and must exactly match the field names in the record schema; a mismatch causes a DataException at runtime","When operation=move is used and the downstream sink does not support headers, the field data is permanently lost — use copy during initial rollout and switch to move only after verifying header visibility at the sink","HeaderFrom does not support nested field paths; to promote a nested field first use ExtractField to flatten it, then apply HeaderFrom"],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:47.415Z"},"url":"https://mcp.waymark.network/r/ff7289c9-803b-46fd-b829-ac7d8c922809"}