‹ All MLA-C01 questions

MLA-C01 Practice Question 92: Firehose Parquet Conversion

AWS Certified Machine Learning Engineer – Associate (MLA-C01) · Test 10 · question 2 of 10

Data Preparationmedium

A smart-home company delivers JSON device events to Amazon S3 through Amazon Data Firehose. Data scientists build training features with Amazon Athena queries that use 6 of each event's 80 fields, and the queries are slow and expensive because Athena scans entire JSON records. The team wants the events to land in S3 in a columnar format, without adding a Lambda function or a separate conversion job.

What should the team do?

Select one answer
Show answer and explanation

Answer:

  • B. Enable record format conversion on the Firehose stream, using an AWS Glue Data Catalog table for the schema and Apache Parquet as the output format

Amazon Data Firehose can convert incoming JSON records to Apache Parquet or Apache ORC before writing them to S3. These columnar formats save space and make queries faster than row-oriented JSON. The conversion needs a deserializer for the JSON input, a serializer for the output format, and a schema, which Firehose reads from a table you define in the AWS Glue Data Catalog. Athena then reads only the 6 columns a query uses, and there is no Lambda function or extra job to run (option B).

- A is wrong because it adds the Lambda function the team wants to avoid, and Firehose already has built-in format conversion, so hand-writing Parquet inside a transformation is unnecessary. - C is wrong because it adds the separate conversion job the team ruled out, keeps two copies of the data, and leaves the newest day of events in JSON until the job runs. - D is wrong because compressed JSON is still a row format. Athena must still read and parse whole records to get 6 of 80 fields, so it cannot skip unused columns the way it can with Parquet.

Reference: Convert input data format in Amazon Data Firehose

Practice Test 10 ›

Study guides for MLA-C01