Replace deprecated meta#13
Conversation
metadata should be used now
| "Returns the value of a metadata key from the new message being created as a string, or `null` if the key does not exist. Changes made to metadata during a mapping will be reflected by this function.", | ||
| NewExampleSpec("", | ||
| `root.topic = root_meta("kafka_topic")`, | ||
| `root.topic = root_meta("nope") | root_meta("also nope") | "default"`, |
There was a problem hiding this comment.
Thanks for the cleanup! Note that root_meta() wasn't renamed to root_metadata(): https://docs.redpanda.com/redpanda-connect/guides/bloblang/functions/#root_meta. In some cases, replacing meta() with metadata() can break things because metadata() can return any type of object, not just strings. Some of these changes will have to be tested before merging.
There was a problem hiding this comment.
PS: I just recalled that I already did this stuff in redpanda-data/connect#2588. I can port it over and clean it up in the next few days so it can be merged.
|
|
metadata should be used now