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

Include null fields in deserialized AVRO data #2129

Open
justinaslelys opened this issue Mar 24, 2025 · 2 comments
Open

Include null fields in deserialized AVRO data #2129

justinaslelys opened this issue Mar 24, 2025 · 2 comments
Labels
enhancement New feature or request topic data Kafka Topic data ui Need an ui update

Comments

@justinaslelys
Copy link

First of all, thank you for providing such a great tool!

I’m encountering an issue with how null fields are displayed in AKHQ when using a Schema Registry connection (type: confluent) and AVRO-serialized data. Specifically, when a field is set to null in our schema and serialized accordingly (e.g., \x00), AKHQ omits the corresponding null field in the deserialized view.

Our schema includes a field like:

{
  "name": "completionDate",
  "type": ["null", "string"]
}

When completionDate is null, it is serialized as \x00. As of my understanding, depending on the deserializer, the presence of null fields can differ. For example, our application (using the Python confluent-kafka client v2.5.3) does include null fields in the resulting data, but AKHQ’s topic view does not display them.

Could you please clarify:
Is this the expected behavior? If not, would you be open to a change that preserves null fields in the displayed message?

I’m not sure how complex this change would be to implement, or if the deserializer used by AKHQ inherently omits null fields. Any guidance you can provide would be greatly appreciated!

Thank you again for all your work on AKHQ. It’s a fantastic tool, and I look forward to your feedback.

@github-project-automation github-project-automation bot moved this to Backlog in Backlog Mar 24, 2025
@AlexisSouquiere AlexisSouquiere added enhancement New feature or request topic data Kafka Topic data ui Need an ui update labels Mar 26, 2025
@AlexisSouquiere
Copy link
Collaborator

I think the expected behaviour (skipping null values / showing null values) should be configurable.
AKHQ displays a pretty version of the message (including for timestamps, how union fields are displayed too). I started to work on but didn't finish it.
Are you interested only by the null fields or to completely disable the pretty print to show the raw message ?

@justinaslelys
Copy link
Author

I agree that skipping null values vs showing null values could be configurable.
Disabling pretty print - it's not something I would want to achieve, but let's say having a button to copy raw message to clipboard would be nice. Currently, when I click on "Copy" icon, it goes to produce screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic data Kafka Topic data ui Need an ui update
Projects
Status: Backlog
Development

No branches or pull requests

2 participants