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

get key from avro message #354

Open
talperetz1 opened this issue Feb 1, 2024 · 3 comments
Open

get key from avro message #354

talperetz1 opened this issue Feb 1, 2024 · 3 comments

Comments

@talperetz1
Copy link

i have an Avro message and my avro message key look like this
{"id":1}
i want to get the name of the field in my key in this example id.
there is any way to receive this with Abris
Thank you

@cerveada
Copy link
Collaborator

cerveada commented Feb 2, 2024

You can convert from Avro to Spark format, but you need to somehow get the Avro schema. The key and value are not really different in most cases.

@talperetz1
Copy link
Author

Hi, @cerveada I did it but the the fame i get is with column name from_avro(kafka_binary_key) and the value in this column is 1.
So its look like the key "id" is missing from some reason. I expected to see column id and value 1

@cerveada
Copy link
Collaborator

cerveada commented Feb 5, 2024

Couldn't you just rename the column name to 'key' then?

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

No branches or pull requests

2 participants