Noos
PT EN
RAN-DBDEA-00144
Ranvier · DBDEA

Prova DBDEA Tópicos: transformation Dificuldade: hard A questão está em en.

A reconciliation job must align catalog.sales.silver_orders with the source extract catalog.sales.latest_orders in one atomic pass: matched orders get their status refreshed, matched orders whose source status is 'CANCELLED' must be removed from the target, and unmatched source orders must be inserted. ```sql MERGE INTO catalog.sales.silver_orders AS t USING catalog.sales.latest_orders AS s ON t.order_id = s.order_id -- WHEN clauses omitted ``` Which approach meets all three requirements in this single atomic pass?

Alternativas (Modo Leitura) Clique para filtrar a discussão →
  1. A. Run two MERGE statements in sequence: one that updates matched rows and inserts new ones, then one that deletes the cancelled orders
  2. B. Use a single MERGE with WHEN MATCHED THEN UPDATE SET * and WHEN NOT MATCHED THEN INSERT *, issuing a separate DELETE for the cancelled orders
  3. C. Use a single MERGE with WHEN MATCHED AND s.status = 'CANCELLED' THEN DELETE, then WHEN MATCHED THEN UPDATE SET *, then WHEN NOT MATCHED THEN INSERT *
  4. D. Replace the MERGE with an UPDATE on the matched rows followed by REPLACE WHERE, rewriting the table with the surviving and new orders
Revelar gabarito

Resposta correta: Use a single MERGE with WHEN MATCHED AND s.status = 'CANCELLED' THEN DELETE, then WHEN MATCHED THEN UPDATE SET *, then WHEN NOT MATCHED THEN INSERT *

Referência: https://docs.databricks.com/aws/en/delta/merge

02 — Camada de Mielina · Discussão Canônica

Onde a prova tenta te enganar — e como quem passou resolveu.

0 Aprovados

contribuíram nesta questão

Matriz de Dissecção de Alternativas Clique numa alternativa para filtrar ou inaugurar a dissecção.
✦ Síntese Consolidada (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Inaugurar síntese desta questão →

Ainda não há síntese comunitária consolidada para esta questão. Abaixo está o ponto de partida oficial verificável — se você passou na prova, inaugure a dissecção das alternativas.

Gabarito Oficial (C): Use a single MERGE with WHEN MATCHED AND s.status = 'CANCELLED' THEN DELETE, then WHEN MATCHED THEN UPDATE SET *, then WHEN NOT MATCHED THEN INSERT *

⚓ Ancorado na Fonte Oficial: https://docs.databricks.com/aws/en/delta/merge
Ranvier · DBDEA

Contribuir com a Questão

Sua contribuição constrói sua Bainha Orbital

Contribuições dos pares

Nenhuma contribuição pública ainda. Seja o primeiro aprovado a explicar por que as alternativas incorretas enganam — sua contribuição constrói sua Bainha Orbital.