DA0-002 Data Acquisition and Preparation Practice Question
A data analyst is tasked with extracting data from a legacy system that outputs fixed-width text files. The analyst needs to parse these files into a structured format. Which tool or method is most appropriate for this task?
⚠ Common exam trap
Many exam-takers assume a graphical ETL tool is always the best for data extraction, but the question specifically tests the ability to handle unstructured or semi-structured legacy formats where scripting provides the necessary precision and automation.
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
✓
A scripting language such as Python
Python is the most appropriate choice because fixed-width text files require precise column slicing based on character positions, which Python's string slicing and libraries like `struct` or `pandas.read_fwf` handle natively. Unlike graphical ETL tools or spreadsheets, Python provides programmatic control to define exact field widths, handle edge cases like missing delimiters, and process large files efficiently without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A spreadsheet application
Why it's wrong here
Spreadsheets have limitations on data size and are not efficient for large files.
- ✗
An ETL tool with a graphical interface
Why it's wrong here
An ETL tool with a graphical interface typically relies on metadata or schema-on-read capabilities, whereas fixed-width text files require explicit column-position definitions (start and end byte offsets) that such tools often cannot infer without manual configuration of a format file. It is tempting because ETL tools excel at transforming and loading structured data from databases or delimited files, and would be correct if the legacy system outputted CSV or JSON with consistent delimiters.
- ✓
A scripting language such as Python
Why this is correct
Python provides libraries and string manipulation ideal for parsing fixed-width files.
- ✗
SQL
Why it's wrong here
SQL is used for querying databases, not parsing fixed-width files.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DA0-002 question from scratch — 986 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 DA0-002 practice question is part of Courseiva's free CompTIA 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 DA0-002 exam.