Questão 3 — Simulado AWS Certified Data Engineer – Associate (DEA-C01) | Questões Atualizadas
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: 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?
- A. All customer records that exist in both the customer accounts table and the monthly_accounts_update table will be deleted from the accounts table.
- B. Only customer records that are present in both tables will be retained in the customer accounts table.
- C. The monthly_accounts_update table will be deleted.
- D. No records will be deleted because the command syntax is not valid in AWS Glue.
Resposta correta:
A
Explicação
Explanation: In AWS Glue's SQL implementation (Spark SQL-compatible), the MERGE INTO statement supports conditional actions. The clause WHEN MATCHED THEN DELETE deletes matching records from the target table (accounts) where the join condition is true. "A MERGE INTO statement can perform updates, inserts, or deletes based on the match condition between source and target tables." Ace the AWS Certified Data Engineer - Associate Certification - version 2 - apple.pdf
Quer todas as 289 questões por R$ 198,00?