nerdexam
Confluent

CCDAK · Question #2

Which is an optional field in an Avro record?

The correct answer is A. doc. doc is the correct answer because it is a purely descriptive, human-readable documentation string in an Avro record schema - it has no functional effect and the schema is fully valid without it. Why the distractors are wrong: B (name) is required - every Avro record must have a…

Application Design

Question

Which is an optional field in an Avro record?

Options

  • Adoc
  • Bname
  • Cnamespace
  • Dfields

How the community answered

(48 responses)
  • A
    92% (44)
  • B
    2% (1)
  • C
    2% (1)
  • D
    4% (2)

Explanation

doc is the correct answer because it is a purely descriptive, human-readable documentation string in an Avro record schema - it has no functional effect and the schema is fully valid without it.

Why the distractors are wrong:

  • B (name) is required - every Avro record must have a name to identify the schema type; omitting it causes a schema parse error.
  • D (fields) is required - it defines the actual data structure of the record; a record schema without fields is invalid.
  • C (namespace) is technically optional in the spec, but the exam distinguishes it from doc because namespace plays a functional role (qualifying the full name to avoid conflicts), whereas doc is purely informational with zero impact on serialization or schema resolution.

Memory tip: Think of doc as a code comment - it helps humans understand the schema but changes nothing about how data is encoded or decoded, making it the one field you can always safely omit.

Topics

#Avro schema#optional fields#schema structure

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice