Free Amazon-DEA-C01 Exam Braindumps
AWS Certified Data Engineer - Associate Questions 81–88 (page: 12)

Updated On: 3-Aug-2026

A data engineer creates an AWS Glue Data Catalog table by using an AWS Glue crawler that is named Orders. The data engineer wants to add the following new partitions: s3://transactions/orders/order_date=2023-01-01 s3://transactions/orders/order_date=2023-01-02 The data engineer must edit the metadata to include the new partitions in the table without scanning all the folders and files in the location of the table.
Which data definition language (DDL) statement should the data engineer use in Amazon Athena?

  1. ALTER TABLE Orders ADD PARTITION(order_date=’2023-01-01’) LOCATION ‘s3://transactions/orders/order_date=2023-01-01’; ALTER TABLE Orders ADD PARTITION(order_date=’2023-01-02’) LOCATION ‘s3://transactions/orders/order_date=2023-01-02’;
  2. MSCK REPAIR TABLE Orders;
  3. REPAIR TABLE Orders;
  4. ALTER TABLE Orders MODIFY PARTITION(order_date=’2023-01-01’) LOCATION ‘s3://transactions/orders/2023-01-01’; ALTER TABLE Orders MODIFY PARTITION(order_date=’2023-01-02’) LOCATION ‘s3://transactions/orders/2023-01-02’;

Answer(s): A

Explanation:

The correct answer is A . Here's why:
The requirement is to add new partitions to an existing AWS Glue Data Catalog table ( Orders ) without rescanning the entire data location. The most efficient way to achieve this is by directly adding the partition metadata using the ALTER TABLE ADD PARTITION DDL statement in Amazon Athena.
Option A accurately reflects this approach. It uses ALTER TABLE Orders ADD PARTITION to specifically add the new partitions order_date='2023-01-01' and order_date='2023-01-02' to the Orders table. Crucially, it also specifies the LOCATION for each partition, which is the S3 path where the data for that partition resides
( s3://transactions/orders/order_date=2023-01-01 and s3://transactions/orders/order_date=2023-01-02 ). This directly updates the metadata within the Glue Data Catalog without triggering a full scan.
Option B ( MSCK REPAIR TABLE Orders ) attempts to repair the table metadata, but it requires scanning the S3
location to discover new partitions. This contradicts the requirement of avoiding a full scan. MSCK REPAIR
TABLE does not allow for explicit specification of the partition location, it discovers partitions by directory structure.
Option C ( REPAIR TABLE Orders ) is not a valid Athena DDL statement. It is a command specific to Hive and might not be supported in Athena/Glue contexts for partition management in the same way.
Option D ( ALTER TABLE Orders MODIFY PARTITION ) is used to modify the location of an existing partition. It does not add new partitions. Since the partitions don't exist yet in the catalog, this command would not function as desired. The partitions need to be added before they can be modified. Furthermore, the provided path s3://transactions/orders/2023-01-01 is not adhering to the standard partition naming convention which is s3://transactions/orders/order_date=2023-01-01 .
Therefore, ALTER TABLE ADD PARTITION is the appropriate DDL statement to directly add the partition metadata to the AWS Glue Data Catalog table without performing a full data scan, fulfilling the requirements of the question.
For further reading on Athena partition management, consider the following resource:
AWS Athena - Working with Partitioned Data



A company stores 10 to 15 TB of uncompressed .csv files in Amazon S3. The company is evaluating Amazon Athena as a one-time query engine. The company wants to transform the data to optimize query runtime and storage costs.
Which file format and compression solution will meet these requirements for Athena queries?

  1. .csv format compressed with zip
  2. JSON format compressed with bzip2
  3. Apache Parquet format compressed with Snappy
  4. Apache Avro format compressed with LZO

Answer(s): C

Explanation:

The correct answer is C: Apache Parquet format compressed with Snappy. Here's why:
Athena benefits significantly from columnar storage formats like Apache Parquet and Apache Avro, as it only reads the columns needed for the query, reducing I/O and improving query performance. Parquet is often favored for its efficient encoding and compression schemes. CSV and JSON are row-oriented, requiring Athena to scan entire rows even if only a few columns are needed, leading to slower query times and increased costs.
Compression is crucial for reducing storage costs and improving I/O performance. Snappy is a fast compression/decompression algorithm that balances compression ratio with speed. Bzip2 and LZO offer higher compression ratios but are generally slower, which can negatively impact query performance. Zip is suitable for archiving but not optimal for querying large datasets in Athena.
Given the requirement for optimizing both query runtime and storage costs, Parquet with Snappy strikes the best balance. Parquet's columnar nature reduces data scanned, and Snappy provides a good trade-off between compression ratio and decompression speed. Avro is also columnar, but Parquet is generally more efficient for analytical workloads. For a one-time query, ease of setup also plays a role, and Parquet on S3 with Snappy is generally straightforward to configure with Athena.
Therefore, Apache Parquet with Snappy is the most suitable choice.
Authoritative Links:
Amazon Athena Best Practices: https://docs.aws.amazon.com/athena/latest/ug/best-practices.html Apache Parquet: https://parquet.apache.org/ Snappy Compression: https://github.com/google/snappy



A company uses Apache Airflow to orchestrate the company's current on-premises data pipelines. The company runs SQL data quality check tasks as part of the pipelines. The company wants to migrate the pipelines to AWS and to use AWS managed services.
Which solution will meet these requirements with the LEAST amount of refactoring?

  1. Setup AWS Outposts in the AWS Region that is nearest to the location where the company uses Airflow. Migrate the servers into Outposts hosted Amazon EC2 instances. Update the pipelines to interact with the Outposts hosted EC2 instances instead of the on-premises pipelines.
  2. Create a custom Amazon Machine Image (AMI) that contains the Airflow application and the code that the company needs to migrate. Use the custom AMI to deploy Amazon EC2 instances. Update the network connections to interact with the newly deployed EC2 instances.
  3. Migrate the existing Airflow orchestration configuration into Amazon Managed Workflows for Apache Airflow (Amazon MWAA). Create the data quality checks during the ingestion to validate the data quality by using SQL tasks in Airflow.
  4. Convert the pipelines to AWS Step Functions workflows. Recreate the data quality checks in SQL as Python based AWS Lambda functions.

Answer(s): C

Explanation:

The best solution is C, migrating the existing Airflow configuration to Amazon Managed Workflows for Apache Airflow (Amazon MWAA) and integrating data quality checks using SQL tasks within Airflow. This approach minimizes refactoring because it allows the company to leverage its existing Airflow workflows with minimal changes. Amazon MWAA is a managed service that simplifies the setup, operation, and scaling of Airflow in the cloud, freeing the company from managing the underlying infrastructure. This reduces operational overhead.
Creating data quality checks as SQL tasks in Airflow enables a direct translation of the company's current on-premises SQL checks into the AWS environment. This minimizes code rewriting. Options A and B involve managing EC2 instances or Outposts, which increases management overhead and doesn't fully leverage AWS managed services. Option D requires completely rewriting the SQL data quality checks as Python-based Lambda functions, resulting in significant refactoring effort.
Amazon MWAA provides seamless integration with other AWS services, allowing the company to easily connect to its data sources and destinations. It's also scalable and highly available, ensuring the reliability of the data pipelines. This allows the company to focus on data quality checks. Choosing MWAA retains Airflow, and allows SQL tasks to be re-used.
https://aws.amazon.com/managed-workflows-for-apache-airflow/https://docs.aws.amazon.com/mwaa/latest/userguide/what-is-mwaa.html



A company uses Amazon EMR as an extract, transform, and load (ETL) pipeline to transform data that comes from multiple sources. A data engineer must orchestrate the pipeline to maximize performance.
Which AWS service will meet this requirement MOST cost effectively?

  1. Amazon EventBridge
  2. Amazon Managed Workflows for Apache Airflow (Amazon MWAA)
  3. AWS Step Functions
  4. AWS Glue Workflows

Answer(s): C

Explanation:

The correct answer is C, AWS Step Functions. Here's why:
Orchestration Focus: The question explicitly asks for a service to "orchestrate" the ETL pipeline. Orchestration refers to coordinating and managing a complex series of tasks to achieve a larger goal. Step Functions is designed precisely for this purpose, allowing you to define workflows as state machines that manage the execution of individual tasks in a specific order.
Cost-Effectiveness: For orchestration of an ETL pipeline involving EMR jobs, Step Functions often proves more cost-effective than alternatives. Step Functions charges per state transition, meaning you only pay for the actual execution of the steps in your workflow. MWAA, on the other hand, involves running an entire Airflow environment, which can be more expensive if the workflow isn't constantly running.
Integration with AWS Services: Step Functions natively integrates with a wide range of AWS services, including Amazon EMR. This tight integration makes it simple to invoke EMR jobs (e.g., start a Spark job, monitor its status, and move to the next step upon completion) within a Step Functions workflow.
AWS Glue and EventBridge Considerations: While AWS Glue Workflows can orchestrate Glue jobs, the question focuses on orchestrating an EMR pipeline. EventBridge is primarily for event-driven architectures and triggering actions based on events; it's less suitable for defining and managing the sequential steps of a complex ETL pipeline.
MWAA Considerations: Amazon MWAA provides a managed Apache Airflow environment.
While Airflow can orchestrate complex workflows, MWAA is generally better suited for more complex data engineering pipelines where you need the flexibility and features that Airflow provides. This often comes with a cost and operational overhead that's not always necessary for simpler ETL pipeline orchestration. Step Functions provides a simpler and often more cost-effective alternative when you specifically need a service for orchestration.
State Management: Step Functions excels at managing the state of a workflow. It keeps track of the current step, inputs, outputs, and any error conditions, making it easier to debug and monitor the ETL pipeline.
Therefore, for orchestrating an EMR-based ETL pipeline while maximizing cost-effectiveness, AWS Step Functions is the most suitable choice.
Further Research:
AWS Step Functions: https://aws.amazon.com/step-functions/ Amazon MWAA: https://aws.amazon.com/managed-workflows-for-apache-airflow/



An online retail company stores Application Load Balancer (ALB) access logs in an Amazon S3 bucket. The company wants to use Amazon Athena to query the logs to analyze traffic patterns. A data engineer creates an unpartitioned table in Athena. As the amount of the data gradually increases, the response time for queries also increases. The data engineer wants to improve the query performance in Athena.
Which solution will meet these requirements with the LEAST operational effort?

  1. Create an AWS Glue job that determines the schema of all ALB access logs and writes the partition metadata to AWS Glue Data Catalog.
  2. Create an AWS Glue crawler that includes a classifier that determines the schema of all ALB access logs and writes the partition metadata to AWS Glue Data Catalog.
  3. Create an AWS Lambda function to transform all ALB access logs. Save the results to Amazon S3 in Apache Parquet format. Partition the metadata. Use Athena to query the transformed data.
  4. Use Apache Hive to create bucketed tables. Use an AWS Lambda function to transform all ALB access logs.

Answer(s): B

Explanation:

The correct answer is B . Here's why:
The core problem is slow query performance due to the increasing volume of data in the S3 bucket. To address this, we need to partition the data and ensure that the Athena table has awareness of these partitions via the AWS Glue Data Catalog.
Option B is the most efficient way to achieve this with the least operational effort. An AWS Glue crawler automatically infers the schema and creates or updates the table definition in the AWS Glue Data Catalog. Crucially, you can configure the crawler to identify partition keys based on the directory structure of the ALB access logs in S3 (e.g., year/month/day). The built-in classifiers handle common log formats, so no custom coding is needed. Once the crawler is set up, it automatically discovers and adds new partitions as data is added to S3, significantly improving query performance in Athena by only scanning relevant partitions.
Option A is similar to option B, but an AWS Glue job requires manual creation and coding to define the schema detection and partition metadata writing logic, which adds operational overhead compared to the automatic discovery provided by a Glue crawler.
Option C involves transforming the logs to Parquet format and using Lambda, which, while improving query performance with columnar storage and compression, introduces significant operational complexity. It necessitates managing Lambda functions, transformations, and the partition creation process. It also doesn't leverage the Glue Data Catalog as efficiently as option B.
Option D is the most complex solution, involving bucketing with Hive and using Lambda for data transformation. Hive bucketing is a more advanced technique and typically requires greater expertise to implement and maintain. Additionally, using Lambda adds more operational overhead compared to the automated approach of option B.
Therefore, Option B provides the best balance between improving query performance through partitioning and minimizing operational effort by leveraging the automatic schema inference and partition discovery capabilities of the AWS Glue crawler.
Authoritative Links:
AWS Glue Crawlers: https://docs.aws.amazon.com/glue/latest/dg/add-crawler.html AWS Glue Data Catalog: https://docs.aws.amazon.com/glue/latest/dg/datacatalog-overview.html Amazon Athena Partitioning: https://docs.aws.amazon.com/athena/latest/ug/partitions.html



A company has a business intelligence platform on AWS. The company uses an AWS Storage Gateway Amazon S3 File Gateway to transfer files from the company's on-premises environment to an Amazon S3 bucket. A data engineer needs to setup a process that will automatically launch an AWS Glue workflow to run a series of AWS Glue jobs when each file transfer finishes successfully.
Which solution will meet these requirements with the LEAST operational overhead?

  1. Determine when the file transfers usually finish based on previous successful file transfers. Set up an Amazon EventBridge scheduled event to initiate the AWS Glue jobs at that time of day.
  2. Set up an Amazon EventBridge event that initiates the AWS Glue workflow after every successful S3 File Gateway file transfer event.
  3. Set up an on-demand AWS Glue workflow so that the data engineer can start the AWS Glue workflow when each file transfer is complete.
  4. Set up an AWS Lambda function that will invoke the AWS Glue Workflow. Set up an event for the creation of an S3 object as a trigger for the Lambda function.

Answer(s): B

Explanation:

The correct answer is B because it leverages event-driven architecture for automated workflow initiation, minimizing operational overhead. Let's break down why:
Event-driven architecture: The core of this solution relies on Amazon EventBridge, a serverless event bus service. S3 File Gateway publishes events upon successful file transfers. EventBridge can then be configured to automatically trigger an AWS Glue workflow in response to these events.
Automation: This approach fully automates the process. The data engineer doesn't need to manually monitor file transfers or initiate the Glue workflow. This reduces the operational burden.
Real-time Processing: Glue workflows are triggered immediately after a successful file transfer.
Now, let's discuss why the other options are not as ideal:
Option A (Scheduled Event): This is suboptimal because file transfer times can vary. A fixed schedule might trigger the Glue workflow before a file transfer is complete or wait unnecessarily long after the transfer is finished. It introduces a time delay which is less effective.
Option C (On-demand Workflow): Requiring manual initiation defeats the purpose of automation. It creates unnecessary operational work for the data engineer.
Option D (Lambda Function): While a Lambda function can indeed invoke the Glue workflow, it adds an extra layer of complexity compared to directly connecting EventBridge to the Glue workflow. The Lambda function's sole purpose would be to relay the event, which EventBridge can handle directly. EventBridge simplifies architecture and requires less maintenance than Lambda.
In conclusion, Option B offers the most efficient and automated approach by directly linking S3 File Gateway events to Glue workflow initiation via EventBridge, ensuring timely and streamlined data processing with minimal operational effort.
Supporting Links:
Amazon EventBridge: https://aws.amazon.com/eventbridge/ AWS Glue Workflows: https://docs.aws.amazon.com/glue/latest/dg/workflows-getting-started.html Amazon S3 File Gateway: https://aws.amazon.com/storagegateway/file/



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. Configure the Amazon Redshift Federated Query feature to query live transactional data that is in the PostgreSQL database.
  2. Configure Amazon Redshift Spectrum to query live transactional data that is in the PostgreSQL database.
  3. 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. 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 cluster. Configure Redshift Spectrum to access historical data from S3 Glacier Flexible Retrieval.
  5. Create a materialized view in Amazon Redshift that combines live, current, and historical data from different sources.

Answer(s): A,C

Explanation:

Let's analyze the proposed solution (AC) and justify why it correctly addresses the requirements.
Option A: Configure the Amazon Redshift Federated Query feature to query live transactional data that is in the PostgreSQL database.
This is a valid approach for directly querying the Aurora PostgreSQL database from Redshift. Federated Query allows Redshift to query data residing in other databases without needing to load it into Redshift. This satisfies the requirement to combine data from the live transactional data in PostgreSQL.
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 is also a valid and cost-effective approach for archiving historical data. The UNLOAD command efficiently exports data from Redshift to S3. Deleting the older data after unloading ensures Redshift keeps only the most recent 15 months of data, thus reducing costs. Redshift Spectrum allows querying data directly from S3 without loading it into Redshift, enabling analytics that combine current and historical data.
Why other options are incorrect:
Option B: Redshift Spectrum is for querying data in S3 data lakes, not directly querying PostgreSQL. Option D: S3 Glacier Flexible Retrieval is optimized for infrequent access and comes with retrieval costs that could be higher if you are running analytics often on the archived data. Redshift Spectrum works with S3 Standard, S3 Standard-IA, and S3 Intelligent-Tiering. Storing archived data in S3 and configuring Redshift Spectrum is a more cost-effective solution. Option E: Materialized views in Redshift are stored within Redshift itself and will not provide the cost saving for archiving the historical data to S3.
While materialized views can speed up query performance, they would duplicate data in Redshift, counteracting the goal of cost optimization.
In summary:
Options A and C together provide a solution that meets all requirements. Federated Query enables querying the live data in PostgreSQL, while UNLOAD and Redshift Spectrum facilitate archiving historical data to S3 and running queries that combine live, current, and archived data. This approach also keeps only the most recent 15 months of data in Redshift, reducing costs.
Supporting Links:
Amazon Redshift Federated Query: https://docs.aws.amazon.com/redshift/latest/dg/federated-query.html Amazon Redshift Spectrum: https://docs.aws.amazon.com/redshift/latest/dg/c-using-spectrum.html Redshift UNLOAD command: https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html



A manufacturing company has many IoT devices in facilities around the world. The company uses Amazon Kinesis Data Streams to collect data from the devices. The data includes device ID, capture date, measurement type, measurement value, and facility ID. The company uses facility ID as the partition key. The company's operations team recently observed many WriteThroughputExceeded exceptions. The operations team found that some shards were heavily used but other shards were generally idle.
How should the company resolve the issues that the operations team observed?

  1. Change the partition key from facility ID to a randomly generated key.
  2. Increase the number of shards.
  3. Archive the data on the producer's side.
  4. Change the partition key from facility ID to capture date.

Answer(s): A

Explanation:

The issue observed, WriteThroughputExceeded exceptions combined with uneven shard utilization, indicates a "hot partition" problem in Kinesis Data Streams. This happens when a disproportionate amount of data is directed to a small number of shards because of a poorly chosen partition key. Facility ID, while seemingly logical, leads to this problem if some facilities generate significantly more data than others.
Option A, changing the partition key to a randomly generated key, is the most effective solution. A random key distributes data more evenly across all shards, mitigating the "hot partition" effect. By doing this, the write load is spread across all available shards, preventing specific shards from being overwhelmed and triggering WriteThroughputExceeded exceptions. The goal is to achieve even distribution to maximize throughput.
Option B, increasing the number of shards, can provide temporary relief but doesn't address the root cause.
While more shards increase overall capacity, the uneven distribution caused by the facility ID partition key remains. The "hot shards" will still be overwhelmed, negating the benefit of the increased shard count.
Option C, archiving data on the producer side, reduces the amount of data being written to Kinesis, but it is not solving the core problem of uneven distribution. Archiving data on the producer side would reduce the overall throughput, which could have a negative impact if the goal is to keep and analyze all the data. It is more appropriate to solve the root cause of the problem (uneven partition) before reducing the amount of data.
Option D, changing the partition key to capture date, is likely to worsen the issue. Capture date may also lead to uneven distribution, especially if data generation is not uniform throughout the day or if specific time periods have significantly higher data volumes. Daily patterns could still lead to certain shards being overloaded.
In summary, a randomly generated key provides the most immediate and effective solution to the hot partition problem by ensuring a more uniform distribution of data across all available Kinesis shards.
Further reading:
AWS Kinesis Data Streams Developer Guide - Choosing a Partition Key: https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html AWS Big Data Blog - Tuning Amazon Kinesis Data Streams for optimal performance: https://aws.amazon.com/blogs/big-data/tuning-amazon-kinesis-data-streams-for-optimal-performance/



Viewing page 12 of 47
Viewing questions 89 - 96 out of 366 questions


Post your Comments and Discuss Amazon Amazon-DEA-C01 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!