MLA-C01 Data Preparation for Machine Learning Practice Question
Exhibit
An AWS Glue job fails with the following error from the CloudWatch logs: "Conversion error: Unable to convert column 'price' from String to Double for some rows."
Refer to the exhibit. The Glue job reads a CSV file and attempts to write to a Parquet table. What is the most likely cause of this error?
⚠ Common exam trap
AWS often tests the distinction between schema inference behavior and runtime type conversion errors, where candidates mistakenly attribute the error to missing data or schema detection rather than the actual parsing failure caused by malformed values.
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
✓
The 'price' column contains non-numeric values in some rows
The error message indicates a 'NumberFormatException' when parsing the 'price' column, which occurs when Spark attempts to convert a string value to a numeric type. Since the Glue job's schema inference likely detected 'price' as a numeric column based on the majority of rows, any row containing a non-numeric value (e.g., 'N/A', 'null', or a currency symbol) will cause this parsing failure during the write to Parquet.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The 'price' column is missing from some rows
Why it's wrong here
Missing column would cause a different error indicating missing field.
- ✗
The schema inference incorrectly detected the column as String
Why it's wrong here
Schema inference would set String type, but conversion attempts to cast to Double, so the data itself is problematic.
- ✓
The 'price' column contains non-numeric values in some rows
Why this is correct
Non-numeric strings like 'N/A' or commas cause conversion errors.
- ✗
The CSV file is compressed and not properly decompressed
Why it's wrong here
Compression would cause a different error, not a conversion error.
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 835-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 MLA-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 MLA-C01 exam.