Noos
PT EN
RAN-DBDEA-00223
Ranvier · DBDEA

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

A bronze events table stores customer details in a nested column, declared as follows: ```sql customer STRUCT<name: STRING, address: STRUCT<city: STRING, country: STRING>> ``` The silver table must expose the customer's city as a top-level column. The engineer wants the simplest native way to read that nested field, without flattening or custom code. Which approach is correct?

Alternativas (Modo Leitura) Clique para filtrar a discussão →
  1. A. Dot notation — select customer.address.city, which resolves nested struct fields natively in SQL and PySpark; arrays use bracket indexing like items[0]
  2. B. Explode the structs first — a nested field can only be read after the entire struct has been flattened into separate rows of the DataFrame
  3. C. Rewrite the transformation in SQL — PySpark DataFrames cannot traverse fields that live inside a struct column
  4. D. Register a Python UDF — native functions cannot reach inside a struct, so the field must be parsed out in custom code
Revelar gabarito

Resposta correta: Dot notation — select customer.address.city, which resolves nested struct fields natively in SQL and PySpark; arrays use bracket indexing like items[0]

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 (A): Dot notation — select customer.address.city, which resolves nested struct fields natively in SQL and PySpark; arrays use bracket indexing like items[0]

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.