Noos
PT EN
RAN-DBDEA-00211
Ranvier · DBDEA

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

A daily consolidation reads two regional extracts into DataFrames. Both extracts carry the same four columns — order_id, order_date, amount, region — but the EU file delivers them in a different column order than the US file. The combined output must pair every column with its correct data regardless of the position in which each file lists it. How should the engineer stack the two DataFrames?

Alternativas (Modo Leitura) Clique para filtrar a discussão →
  1. A. eu.union(us) — union() resolves columns by name automatically whenever the two schemas differ in column position
  2. B. Reorder one DataFrame with an explicit select() first — manually aligning the column positions is the only safe way to combine the extracts
  3. C. It cannot be done — Spark refuses to combine DataFrames whose columns are not declared in the same order
  4. D. eu.unionByName(us) — it pairs columns by name between the two DataFrames, so position differences cannot mismatch the data
Revelar gabarito

Resposta correta: eu.unionByName(us) — it pairs columns by name between the two DataFrames, so position differences cannot mismatch the data

Referência: https://docs.databricks.com/aws/en/pyspark/reference

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 (D): eu.unionByName(us) — it pairs columns by name between the two DataFrames, so position differences cannot mismatch the data

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.