CompTIA DataX DY0-001 (V1) Practice Question

A data scientist is processing a large dataset of e-commerce transactions from a web API. The data is in a JSON format where each object represents a customer and contains a customer_id and a nested list of orders. Each object within the orders list has an order_id and a nested list of products. The goal is to load this data into a relational database for cohort analysis, which requires normalizing the structure into separate, related tables. Which of the following is the MOST effective and scalable approach to flatten this nested JSON?

  • Utilize the pandas json_normalize function, specifying the record_path to the nested 'products' list and using the meta argument to include customer_id and order_id for relational mapping.

  • Develop a custom, deeply nested loop that iterates through each customer, their orders, and products, appending the data row-by-row into a single denormalized list before converting to a table.

  • Read the entire JSON file as a single text string and apply a complex regular expression with multiple capture groups to extract all customer, order, and product details simultaneously.

  • First, convert the JSON structure to an equivalent XML format, then use an XSLT stylesheet to define the transformation rules for flattening the data into a tabular structure.

CompTIA DataX DY0-001 (V1)
Operations and Processes
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

SAVE $64
$529.00 $465.00
Bash, the Crucial Exams Chat Bot
AI Bot