Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated meta #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndreasBergmeier6176
Copy link
Contributor

metadata should be used now

metadata should be used now
@@ -609,12 +609,12 @@ var _ = registerFunction(
"root_meta",
"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
Collaborator

@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
Collaborator

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.

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.

2 participants