nerdexam
AmazonAmazon

DEA-C01 · Question #230

DEA-C01 Question #230: Real Exam Question with Answer & Explanation

The correct answer is A: All customer records that exist in both the customer accounts table and the. {"question_number": 9, "question": "A data engineer runs a MERGE...WHEN MATCHED THEN DELETE SQL command in AWS Glue ETL...", "correct_answer": "A", "explanation": "The SQL MERGE statement compares rows between a target table (accounts, aliased as t) and a source table (monthly_ac

Data Ingestion and Transformation

Question

A data engineer is using an AWS Glue ETL job to remove outdated customer records from a table that contains customer account information. The data engineer is using the following SQL command to remove customers that exist in a table named monthly_accounts_update table from the customer accounts table: MERGE INTO accounts t USING monthly_accounts_update s ON t.customer = s.customer WHEN MATCHED THEN DELETE What will happen when the data engineer runs the SQL command?

Options

  • AAll customer records that exist in both the customer accounts table and the
  • BOnly customer records that are present in both tables will be retained in the customer accounts
  • CThe monthly_accounts_update table will be deleted.
  • DNo records will be deleted because the command syntax is not valid in AWS Glue.

Explanation

{"question_number": 9, "question": "A data engineer runs a MERGE...WHEN MATCHED THEN DELETE SQL command in AWS Glue ETL...", "correct_answer": "A", "explanation": "The SQL MERGE statement compares rows between a target table (accounts, aliased as t) and a source table (monthly_accounts_update, aliased as s) based on the join condition t.customer = s.customer. The WHEN MATCHED THEN DELETE clause specifies that whenever a row in the target table has a matching customer in the source table, that row is deleted from the target. Therefore, all customer records in the accounts table whose customer value also appears in monthly_accounts_update will be deleted. Option B is wrong because only the matched rows are deleted, not retained. Option C is wrong because the MERGE command never deletes the source table. Option D is wrong because this is valid SQL syntax supported by AWS Glue.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#AWS Glue#ETL#SQL#Data Transformation

Community Discussion

No community discussion yet for this question.

Full DEA-C01 PracticeBrowse All DEA-C01 Questions