DEA-C01 Fixed Schema Practice Question
A company uses AWS Glue to process CSV files from an S3 bucket. The job fails intermittently with a 'SchemaDetectionError' for files that have inconsistent column counts. What is the most efficient way to handle this?
⚠ Common exam trap
The trap is assuming `mergeSchema` works for CSV files. In AWS Glue, `mergeSchema` is only supported for Parquet/ORC formats. For CSV, you must define a fixed schema and use `apply_mapping` to handle inconsistencies.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Define a fixed schema in the Glue job using 'apply_mapping' to map columns.
Defining a fixed schema using the `schema` parameter in the DynamicFrame reader forces Glue to apply that schema to all CSV files. With `apply_mapping`, you can map the actual columns present to the fixed schema, handling inconsistent column counts by ignoring extra columns and filling missing columns with nulls. This avoids schema detection errors without extra preprocessing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the 'mergeSchema' option when reading the DynamicFrame.
Why it's wrong here
Incorrect. `mergeSchema` is only available for Parquet/ORC formats, not CSV. Using it with CSV will have no effect on schema mismatches.
- ✗
Convert all CSV files to Parquet format using a separate preprocessing job.
Why it's wrong here
Incorrect. Converting to Parquet requires an extra preprocessing job, which is less efficient and adds complexity.
- ✓
Define a fixed schema in the Glue job using 'apply_mapping' to map columns.
Why this is correct
Correct. Defining a fixed schema and using `apply_mapping` to map columns effectively handles inconsistent column counts by ensuring a consistent schema is applied to all files.
- ✗
Set the job to 'ignore' schema mismatches in the job parameters.
Why it's wrong here
Incorrect. AWS Glue does not provide a parameter to 'ignore' schema mismatches. The job will still fail on schema detection errors.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This DEA-C01 question is part of Courseiva's 1,711-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DEA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DEA-C01 exam.