Skip to content

Conversation

@AndreasBergmeier6176
Copy link
Contributor

metadata should be used now

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"`,
Copy link
Contributor

@mihaitodor mihaitodor Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants