Bird
Raised Fist0

Which of the following is the correct way to start an Avro record schema definition?

easy📝 Syntax Q12 of Q15
Kafka - Schema Registry
Which of the following is the correct way to start an Avro record schema definition?
A{"type": "enum", "symbols": ["A", "B"]}
B{"type": "array", "items": "string"}
C{"type": "map", "values": "int"}
D{"type": "record", "name": "User", "fields": []}
Step-by-Step Solution
Solution:
  1. Step 1: Identify record schema syntax

    An Avro record schema starts with type "record", a name, and a fields array.
  2. Step 2: Match options to record schema

    Only {"type": "record", "name": "User", "fields": []} matches the record schema format correctly.
  3. Final Answer:

    {"type": "record", "name": "User", "fields": []} -> Option D
  4. Quick Check:

    Record schema = type "record" with name and fields [OK]
Quick Trick: Record schemas always start with type "record" and have fields [OK]
Common Mistakes:
MISTAKES
  • Using array or map types instead of record
  • Missing the name or fields keys
  • Confusing enum with record

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes