The correct answer is a data type mismatch caused by non-numeric values in the 'price' column. When AWS Glue reads a CSV file and attempts to write to a Parquet table, it infers the schema from the majority of rows; if most 'price' entries are numeric, Spark assigns a numeric type to that column. Any row containing a non-numeric value—such as 'N/A', 'null', or a currency symbol—will trigger a NumberFormatException during the write operation, as Spark cannot parse that string into the expected numeric type. On the AWS Certified Machine Learning Engineer Associate MLA-C01 exam, this scenario tests your understanding of schema inference and data cleansing in ETL pipelines, often appearing as a trap where examinees overlook dirty data in CSV files. A common memory tip is to remember that Parquet is strict about types, while CSV is lenient—always cast or clean your columns before writing.
MLA-C01 Data Preparation for Machine Learning Practice Question
This MLA-C01 practice question tests your understanding of data preparation for machine learning. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
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."
A
The 'price' column is missing from some rows
Why wrong: Missing column would cause a different error indicating missing field.
B
The schema inference incorrectly detected the column as String
Why wrong: Schema inference would set String type, but conversion attempts to cast to Double, so the data itself is problematic.
C
The 'price' column contains non-numeric values in some rows
Non-numeric strings like 'N/A' or commas cause conversion errors.
D
The CSV file is compressed and not properly decompressed
Why wrong: Compression would cause a different error, not a conversion error.
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
Option C is correct because 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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The CSV file is compressed and not properly decompressed
Why it's wrong here
Compression would cause a different error, not a conversion error.
Common exam traps
Common exam trap: answer the scenario, not the keyword
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.
Detailed technical explanation
How to think about this question
Under the hood, Spark's schema inference samples a subset of rows to determine column types; if the majority of 'price' values are numeric, it assigns a numeric type (e.g., DoubleType). During the write phase, Spark applies a strict type conversion, and any non-numeric string (e.g., '1,234.56' with a comma, or 'USD 10') triggers a NumberFormatException because Java's Double.parseDouble() cannot handle such formats. In real-world scenarios, this often happens with dirty data containing currency symbols, commas as thousand separators, or placeholder strings like 'N/A'.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Data Preparation for Machine Learning — This question tests Data Preparation for Machine Learning — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The 'price' column contains non-numeric values in some rows — Option C is correct because 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.
What should I do if I get this MLA-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.