Skip to main content

DATA-ENGINEER-ASSOCIATE Online Practice Questions

AWS Certified Data Engineer - Associate (DEA-C01)

403 questions available · Page 1 of 41

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Multiple choice

An application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application experiences occasional downtime. As a result of the downtime, messages within the queue expire and are deleted after 1 day. The message deletions cause data loss for the application.

Which solutions will minimize data loss for the application? (Choose two.)

  1. A

    Increase the message retention period

  2. B

    Increase the visibility timeout.

  3. C

    Attach a dead-letter queue (DLQ) to the SQS queue.

  4. D

    Use a delay queue to delay message delivery

  5. E

    Reduce message processing time.

Show answer and explanation

Correct answers: A, C

Question 2 Multiple choice

A retail company uses Amazon Aurora PostgreSQL to process and store live transactional data. The company uses an Amazon Redshift cluster for a data warehouse.

An extract, transform, and load (ETL) job runs every morning to update the Redshift cluster with new data from the PostgreSQL database. The company has grown rapidly and needs to cost optimize the Redshift cluster.

A data engineer needs to create a solution to archive historical data. The data engineer must be able to run analytics queries that effectively combine data from live transactional data in PostgreSQL, current data in Redshift, and archived historical data. The solution must keep only the most recent 15 months of data in Amazon Redshift to reduce costs.

Which combination of steps will meet these requirements? (Choose Two.)

  1. A

    Configure the Amazon Redshift Federated Query feature to query live transactional data that is in the PostgreSQL database.

  2. B

    Configure Amazon Redshift Spectrum to query live transactional data that is in the PostgreSQL database.

  3. C

    Schedule a monthly job to copy data that is older than 15 months to Amazon S3 by using the UNLOAD command. Delete the old data from the Redshift cluster. Configure Amazon Redshift Spectrum to access historical data in Amazon S3.

  4. D

    Schedule a monthly job to copy data that is older than 15 months to Amazon S3 Glacier Flexible Retrieval by using the UNLOAD command. Delete the old data from the Redshift duster. Configure Redshift Spectrum to access historical data from S3 Glacier Flexible Retrieval.

  5. E

    Create a materialized view in Amazon Redshift that combines live, current, and historical data from different sources.

Show answer and explanation

Correct answers: A, C

Explanation

The goal is to archive historical data from an Amazon Redshift data warehouse while combining live transactional data from Amazon Aurora PostgreSQL with current andhistorical data in a cost-efficient manner. The company wants to keep only the last 15 months of data in Redshift to reduce costs.
Option A: "Configure the Amazon Redshift Federated Query feature to query live transactional data that is in the PostgreSQL database."Redshift Federated Queryallows querying live transactional data directly from Aurora PostgreSQL without having to move it into Redshift, thereby enabling seamless integration of the current data in Redshift and live data in PostgreSQL. This is a cost-effective approach, as it avoids unnecessary data duplication.
Option C: "Schedule a monthly job to copy data that is older than 15 months to Amazon S3 by using the UNLOAD command. Delete the old data from the Redshift cluster. Configure Amazon Redshift Spectrum to access historical data in Amazon S3."This option usesAmazon Redshift Spectrum , which enables Redshift to query data directly in S3 without moving it into Redshift. By unloading older data (older than 15 months) to S3, and then using Spectrum to access it, this approach reduces storage costs significantly while still allowing the data to be queried when necessary.
Option B (Redshift Spectrum for live PostgreSQL data)is not applicable, as Redshift Spectrum is intended for querying data in Amazon S3, not live transactional data in Aurora.
Option D (S3 Glacier Flexible Retrieval)is not suitable because Glacier is designed for long-term archival storage with infrequent access, and querying data in Glacier for analytics purposes would incur higher retrieval times and costs. Option E (materialized views)would not meet the need to archive data or combine it from multiple sources; it is best
suited for combining frequently accessed data already in Redshift.

References:
Amazon Redshift Federated Query
Amazon Redshift Spectrum Documentation
Amazon Redshift UNLOAD Command

Question 3 Single choice

A security company stores IoT data that is in JSON format in an Amazon S3 bucket. The data structure can change when the company upgrades the IoT devices. The company wants to create a data catalog that includes the IoT data. The company's analytics department will use the data catalog to index the data.

Which solution will meet these requirements MOST cost-effectively?

  1. A

    Create an AWS Glue Data Catalog. Configure an AWS Glue Schema Registry. Create a new AWS Glue workload to orchestrate the ingestion of the data that the analytics department will use into Amazon Redshift Serverless.

  2. B

    Create an Amazon Redshift provisioned cluster. Create an Amazon Redshift Spectrum database for the analytics department to explore the data that is in Amazon S3. Create Redshift stored procedures to load the data into Amazon Redshift.

  3. C

    Create an Amazon Athena workgroup. Explore the data that is in Amazon S3 by using Apache Spark through Athena. Provide the Athena workgroup schema and tables to the analytics department.

  4. D

    Create an AWS Glue Data Catalog. Configure an AWS Glue Schema Registry. Create AWS Lambda user defined functions (UDFs) by using the Amazon Redshift Data API. Create an AWS Step Functions job to orchestrate the ingestion of the data that the analytics department will use into Amazon Redshift Serverless.

Show answer and explanation

Correct answer: A

Question 4 Single choice

A company needs to send customer call data from its on-premises PostgreSQL database to AWS to generate near real-time insights. The solution must capture and load updates from operational data stores that run in the PostgreSQL database. The data changes continuously.

A data engineer configures an AWS Database Migration Service (AWS DMS) ongoing replication task. The task reads changes in near real time from the PostgreSQL source database transaction logs for each table. The task then sends the data to an Amazon Redshift cluster for processing.

The data engineer discovers latency issues during the change data capture (CDC) of the task. The data engineer thinks that the PostgreSQL source database is causing the high latency.

Which solution will Confirm that the PostgreSQL database is the source of the high latency?

  1. A

    Use Amazon CloudWatch to monitor the DMS task. Examine the CDCIncomingChanges metric to identify delays in the CDC from the source database.

  2. B

    Verify that logical replication of the source database is configured in the postgresql.conf configuration file.

  3. C

    Enable Amazon CloudWatch Logs for the DMS endpoint of the source database. Check for error messages.

  4. D

    Use Amazon CloudWatch to monitor the DMS task. Examine the CDCLatencySource metric to identify delays in the CDC from the source database.

Show answer and explanation

Correct answer: D

Question 5 Single choice

A company receives .csv files that contain physical address data. The data is in columns that have the following names: Door_No, Street_Name, City, and Zip_Code. The company wants to create a single column to store these values in the following format:

Which solution will meet this requirement with the LEAST coding effort?

  1. A

    Use AWS Glue DataBrew to read the files. Use the NEST TO ARRAY transformation to create the new column.

  2. B

    Use AWS Glue DataBrew to read the files. Use the NEST TO MAP transformation to create the new column.

  3. C

    Use AWS Glue DataBrew to read the files. Use the PIVOT transformation to create the new column.

  4. D

    Write a Lambda function in Python to read the files. Use the Python data dictionary type to create the new column.

Show answer and explanation

Correct answer: B

Explanation

The NEST TO MAP transformation allows you to combine multiple columns into a single column that contains a JSON object with key-value pairs. This is the easiest way to achieve the desired format for the physical address data, as you can simply select thecolumns to nest and specify the keys for each column.
The NEST TO ARRAY transformation creates a single column that contains an array of values, which is not the same as the JSON object format. The PIVOT transformation reshapes the data by creating new columns from unique values in a selected column, which is not applicable for this use case. Writing a Lambda function in Python requires more coding effort than using AWS Glue DataBrew, which provides a visual and interactive interface for data transformations.

Question 6 Single choice

A data engineer needs Amazon Athena queries to finish faster. The data engineer notices that all the files the Athena queries use are currently stored in uncompressed .csv format. The data engineer also notices that users perform most queries by selecting a specific column.

Which solution will MOST speed up the Athena query performance?

  1. A

    Change the data format from .csvto JSON format. Apply Snappy compression.

  2. B

    Compress the .csv files by using Snappy compression.

  3. C

    Change the data format from .csvto Apache Parquet. Apply Snappy compression.

  4. D

    Compress the .csv files by using gzjg compression.

Show answer and explanation

Correct answer: C

Explanation

Amazon Athena is a serverless interactive query service that allows you to analyze data in Amazon S3 using standard SQL. Athena supports various data formats, such as CSV, JSON, ORC, Avro, and Parquet.
However, not all data formats are equally efficient for querying. Some data formats, such as CSV and JSON, are row-oriented, meaning that they store data as a sequence of records, each with the same fields.
Row-oriented formats are suitable for loading and exporting data, but they are not optimal for analytical queries that often access only a subset of columns. Row-oriented formats also do not support compression or encoding techniques that can reduce the data size and improve the query performance.

On the other hand, some data formats, such as ORC and Parquet, are column-oriented, meaning that they store data as a collection of columns, each with a specific data type. Column-oriented formats are ideal for analytical queries that often filter, aggregate, or join data by columns. Column-oriented formats also support compression and encoding techniques that can reduce the data size and improve the query performance. For example, Parquet supports dictionary encoding, which replaces repeated values with numeric codes, and run-length encoding, which replaces consecutive identical values with a single value and a count. Parquet also supports various compression algorithms, such as Snappy, GZIP, and ZSTD, that can further reduce the data size and improve the query performance.

Therefore, changing the data format from CSV to Parquet and applying Snappy compression will most speed up the Athena query performance. Parquet is a column-oriented format that allows Athena to scan only the relevant columns and skip the rest, reducing the amount of data read from S3. Snappy is a compression algorithm that reduces the data size without compromising the query speed, as it is splittable and does not require decompression before reading. This solution will also reduce the cost of Athena queries, as Athena charges based on the amount of data scanned from S3.
The other options are not as effective as changing the data format to Parquet and applying Snappy compression. Changing the data format from CSV to JSON and applying Snappy compression will not improve the query performance significantly, as JSON is also a row-oriented format that does not support columnar access or encoding techniques. Compressing the CSV files by using Snappy compression will reduce the data size, but it will not improve the query performance significantly, as CSV is still a row-oriented format that does not support columnar access or encoding techniques. Compressing the CSV files by using gzjg compression will reduce the data size, but it will degrade the query performance, as gzjg is not a splittable compression algorithm and requires decompression before reading.

Question 7 Single choice

A company wants to migrate an application and an on-premises Apache Kafka server to AWS. The application processes incremental updates that an on-premises Oracle database sends to the Kafka server.

The company wants to use the replatform migration strategy instead of the refactor strategy.

Which solution will meet these requirements with the LEAST management overhead?

  1. A

    Amazon Kinesis Data Streams

  2. B

    Amazon Managed Streaming for Apache Kafka (Amazon MSK) provisioned cluster

  3. C

    Amazon Data Firehose

  4. D

    Amazon Managed Streaming for Apache Kafka (Amazon MSK) Serverless

Show answer and explanation

Correct answer: D

Explanation

Problem Analysis:
The company needs to migrate both an application and an on-premises Apache Kafka server to AWS.
Incremental updates from an on-premises Oracle database are processed by Kafka.
The solution must follow a replatform migration strategy , prioritizing minimal changes and low management overhead .
Key Considerations:
Replatform Strategy: This approach keeps the application and architecture as close to the original as possible, reducing the need for refactoring.
The solution must provide a managed Kafka service to minimize operational burden.
Low overhead solutions like serverless services are preferred.
Solution Analysis:
Option A: Kinesis Data Streams Kinesis Data Streams is an AWS-native streaming service but is not a direct substitute for Kafka.
This option would require significant application refactoring, which does not align with the replatform strategy.
Option B: MSK Provisioned Cluster
Managed Kafka service with fully configurable clusters.
Provides the same Kafka APIs but requires cluster management (e.g., scaling, patching), increasing management overhead.
Option C: Amazon Kinesis Data Firehose
Kinesis Data Firehose is designed for data delivery rather than real-time streaming and processing.
Not suitable for Kafka-based applications.
Option D: MSK Serverless
MSK Serverless eliminates the need for cluster management while maintaining compatibility with Kafka APIs.
Automatically scales based on workload, reducing operational overhead.
Ideal for replatform migrations, as it requires minimal changes to the application.
Final Recommendation:
Amazon MSK Serverlessis the best solution for migrating the Kafka server and application with minimal changes and the least management overhead.

References:
Amazon MSK Serverless Overview
Comparison of Amazon MSK and Kinesis

Question 8 Single choice

A data engineer is configuring Amazon SageMaker Studio to use AWS Glue interactive sessions to prepare data for machine learning (ML) models.

The data engineer receives an access denied error when the data engineer tries to prepare the data by using SageMaker Studio.

Which change should the engineer make to gain access to SageMaker Studio?

  1. A

    Add the AWSGlueServiceRole managed policy to the data engineer's IAM user.

  2. B

    Add a policy to the data engineer's IAM user that includes the sts:AssumeRole action for the AWS Glue and SageMaker service principals in the trust policy.

  3. C

    Add the AmazonSageMakerFullAccess managed policy to the data engineer's IAM user.

  4. D

    Add a policy to the data engineer's IAM user that allows the sts:AddAssociation action for the AWS Glue and SageMaker service principals in the trust policy.

Show answer and explanation

Correct answer: B

Explanation

This solution meets the requirement of gaining access to SageMaker Studio to use AWS Glue interactive sessions. AWS Glue interactive sessions are a way to use AWS Glue DataBrew and AWS Glue Data Catalog from within SageMaker Studio. To use AWS Glue interactive sessions, the data engineer's IAM user needs to have permissions to assume the AWS Glue service role and the SageMaker execution role.
By adding a policy to the data engineer's IAM user that includes the sts:AssumeRole action for the AWS Glue and SageMaker service principals in the trust policy, the data engineer can grant these permissions and avoid the access denied error. The other options are not sufficient or necessary to resolve the error.

References:
Get started with data integration from Amazon S3 to Amazon Redshift using AWS Glue interactive sessions Troubleshoot Errors - Amazon SageMaker AccessDeniedException on sagemaker:CreateDomain in AWS SageMaker Studio, despite having SageMakerFullAccess

Question 9 Single choice

A global ecommerce company occasionally receives customer data files in its Amazon S3 data lake. The company needs to automatically detect new data and mask sensitive data before making the data available to the company's analytics team.

Which solution will meet these requirements with the LEAST operational overhead?

  1. A

    Configure Amazon S3 Event Notifications to detect the new data and trigger an AWS Glue job. Use Amazon Macie to detect and mask the sensitive data. Store the processed data in Amazon Redshift.

  2. B

    Use Amazon Managed Streaming for Apache Kafka (Amazon MSK) to detect incoming data. Use Amazon EMR workflows to detect and mask sensitive data. Store the processed data in Amazon S3.

  3. C

    Use Amazon Kinesis Data Streams to capture new data. Use Amazon Comprehend to detect and mask the sensitive data. Store the processed data in Amazon DynamoDB tables.

  4. D

    Use Amazon EventBridge to detect new data and run AWS Glue workflows. Use AWS Glue DataBrew to detect and mask the sensitive data. Store the processed data in an S3 bucket.

Show answer and explanation

Correct answer: D

Question 10 Multiple choice

A company has a data lake in Amazon S3. The company collects AWS CloudTrail logs for multiple applications. The company stores the logs in the data lake, catalogs the logs in AWS Glue, and partitions the logs based on the year. The company uses Amazon Athena to analyze the logs.

Recently, customers reported that a query on one of the Athena tables did not return any data. A data engineer must resolve the issue.

Which combination of troubleshooting steps should the data engineer take? (Choose Two.)

  1. A

    Confirm that Athena is pointing to the correct Amazon S3 location.

  2. B

    Increase the query timeout duration.

  3. C

    Use the MSCK REPAIR TABLE command.

  4. D

    Restart Athena.

  5. E

    Delete and recreate the problematic Athena table.

Show answer and explanation

Correct answers: A, C

Explanation

The problem likely arises from Athena not being able to read from the correct S3 location or missing partitions. The two most relevant troubleshooting steps involve checking the S3 location and repairing the table metadata.
A. Confirm that Athena is pointing to the correct Amazon S3 location:
One of the most common issues with missing data in Athena queries is that the query is pointed to an incorrect or outdated S3 location. Checking the S3 path ensures Athena is querying the correct data.