DEA-C01 · Question #150
A company receives test results from testing facilities that are located around the world. The company stores the test results in millions of 1 KB JSON files in an Amazon S3 bucket. A data engineer…
The correct answer is B. Use the AWS Glue dynamic frame file-grouping option to ingest the raw input files. Process the. To significantly reduce processing time for millions of small JSON files in AWS Glue, leveraging the dynamic frame file-grouping option for ingestion is the most effective solution.
Question
A company receives test results from testing facilities that are located around the world. The company stores the test results in millions of 1 KB JSON files in an Amazon S3 bucket. A data engineer needs to process the files, convert them into Apache Parquet format, and load them into Amazon Redshift tables. The data engineer uses AWS Glue to process the files, AWS Step Functions to orchestrate the processes, and Amazon EventBridge to schedule jobs. The company recently added more testing facilities. The time required to process files is increasing. The data engineer must reduce the data processing time. Which solution will MOST reduce the data processing time?
Options
- AUse AWS Lambda to group the raw input files into larger files. Write the larger files back to
- BUse the AWS Glue dynamic frame file-grouping option to ingest the raw input files. Process the
- CUse the Amazon Redshift COPY command to move the raw input files from Amazon S3 directly
- DUse Amazon EMR instead of AWS Glue to group the raw input files. Process the files in Amazon
How the community answered
(59 responses)- A5% (3)
- B66% (39)
- C10% (6)
- D19% (11)
Why each option
To significantly reduce processing time for millions of small JSON files in AWS Glue, leveraging the dynamic frame file-grouping option for ingestion is the most effective solution.
While grouping small files into larger ones is a good strategy, using AWS Lambda to perform this as a separate step introduces additional operational complexity, latency, and cost compared to Glue's native dynamic frame grouping capability.
Processing millions of small files (1 KB JSON) is inefficient due to overhead associated with opening, closing, and processing each file; the AWS Glue dynamic frame file-grouping option consolidates these small files into larger, more optimal units for processing, which significantly reduces the data processing time within Glue ETL jobs.
The Amazon Redshift COPY command is designed to load data from S3 into Redshift, but it does not perform the necessary transformation from JSON to Apache Parquet format and is not optimized for efficiently handling millions of 1 KB files directly for processing.
Although Amazon EMR can handle large-scale data processing and grouping, switching from AWS Glue to Amazon EMR introduces significant operational overhead for cluster management and re-architecting the existing pipeline, and Glue's dynamic frames offer a more integrated solution for this specific optimization within the existing Glue ecosystem.
Concept tested: AWS Glue Dynamic Frames small file optimization
Source: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-pyspark-extensions-dynamic-frame.html
Topics
Community Discussion
No community discussion yet for this question.