Bird
Raised Fist0

Identify the error in this Avro schema snippet:

medium📝 Debug Q14 of Q15
Kafka - Schema Registry
Identify the error in this Avro schema snippet:
{"type": "record", "name": "Product", "fields": [{"name": "price", "type": "double"}, {"name": "available"}]}
AMissing type for field "available"
BInvalid record name
CFields array should be empty
DType "double" is not allowed
Step-by-Step Solution
Solution:
  1. Step 1: Check each field for required keys

    Each field must have a "name" and a "type" key.
  2. Step 2: Find missing keys

    The field "available" lacks a "type" key, causing an error.
  3. Final Answer:

    Missing type for field "available" -> Option A
  4. Quick Check:

    Every field needs a type [OK]
Quick Trick: Every field must have a type key defined [OK]
Common Mistakes:
MISTAKES
  • Forgetting to add type for all fields
  • Thinking record name can be empty
  • Assuming double type is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes