DEA-C01 exam dumps

DEA-C01 practice question 70 of 550

AWS Certified Data Engineer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DEA-C01 Question 70

Select 3

You are working as a Data Engineer for a retail company. The company has a large dataset of sales transactions stored in Amazon S3 in CSV format. You need to process this data using Apache Spark on Amazon EMR to calculate the total sales per product category. Which of the following steps should you take to achieve this?

  1. A

    Read the CSV files from Amazon S3 into a Spark DataFrame using the spark.read.csv method.

  2. B

    Use the groupBy function on the DataFrame to aggregate sales data by product category.

  3. C

    Write the aggregated results back to Amazon S3 in JSON format using the write.json method.

  4. D

    Use the filter method to remove duplicate rows before performing the aggregation.

  5. E

    Launch an EC2 instance to store intermediate results during the processing.

Show answer and explanation

Correct answers: A, B, C

Explanation

To process data using Apache Spark on Amazon EMR, you first need to load the data from its source (Amazon S3) into a Spark DataFrame. You can then use Spark’s transformation functions, such as groupBy, to perform the required computations (e.g., aggregating total sales by product category). Finally, the results can be written back to Amazon S3 in the desired format (e.g., JSON). Additional steps like filtering duplicates or launching EC2 instances are either unnecessary or not relevant for this specific use case.

  • A. Correct.

    Correct: Reading data from Amazon S3 into a Spark DataFrame is the first step in processing this data using Spark on EMR.

  • B. Correct.

    Correct: The groupBy function in Spark allows you to group data by a specific column, such as product category, and then perform aggregations like summing up sales.

  • C. Correct.

    Correct: Writing the results back to Amazon S3 in a specific format like JSON is a common step to store processed data for further use.

  • D. Incorrect.

    Incorrect: While the filter method is used to filter data, removing duplicates is not necessary in this specific scenario unless explicitly required by the business logic.

  • E. Incorrect.

    Incorrect: Apache Spark on Amazon EMR manages intermediate results in memory or disk as part of its distributed processing framework, so launching an EC2 instance for this purpose is unnecessary.

Timed practice exam

Take a DEA-C01 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam