A Glue job reads JSON exports where some records omit a field and others store the same field as a string instead of a number. The team wants a structure that tolerates these mismatches and can later be converted to a Spark DataFrame. Which Glue construct fits?
Show answer and explanation
Answer: A
A DynamicFrame is Glue's self-describing tabular abstraction. It carries per-record schema information, so records that omit a field or encode a value with an unexpected type do not break the job; the mismatches can be resolved explicitly and the result converted to a Spark DataFrame for further processing. Crawlers populate the catalog, partition indexes speed metadata lookups, and accumulators are Spark counters, so none of them handles heterogeneous records.
Why the other options are wrong
- B. A crawler infers schemas and writes table definitions to the catalog; it does not hold or repair the records themselves.
- C. A partition index accelerates partition lookups in the catalog and has no role in reconciling per-record type differences.
- D. An accumulator is a write-only shared counter used inside Spark tasks, not a data structure for reading mixed-schema files.
Exam tip. DynamicFrames carry per-record schemas; convert with toDF after resolving choices.