FEFreeExamDumps.in

Implementing Data Engineering Solutions Using Azure Databricks

Topic 1

Question 59

DP-750 voucher + Udemy course (lifetime access) = ₹3,500 for Indian ID card holders.

Details →

You maintain a `silver.sales.monthly_revenue` table with one row per `(product, month, revenue)`. Analysts need a **wide** report with one row per `product` and a separate column per month (`Jan`, `Feb`, `Mar`) holding the summed revenue. Later, a downstream ML pipeline needs the wide table reshaped **back to long** format with one row per `(product, month, revenue)`. ```sql -- Wide report (pivot) SELECT * FROM silver.sales.monthly_revenue PIVOT ( SUM(revenue) FOR month IN ('Jan', 'Feb', 'Mar') ); ``` Which TWO statements about these reshaping transformations are correct? (Choose TWO.)

  • AThe `PIVOT` clause rotates unique values of the `month` column into separate columns and requires an aggregate expression (such as `SUM(revenue)`) for the pivoted cells.
  • BThe `UNPIVOT` clause (or PySpark `unpivot`/`melt`) reverses a pivot by rotating the `Jan`/`Feb`/`Mar` columns back into rows, producing a name column and a value column.
  • C`UNPIVOT` fully restores the original pre-pivot DataFrame including the aggregation, because unpivot reverses `SUM()`.
  • DBy default, `UNPIVOT` includes rows where the value column is `NULL`.
  • EDenormalizing by joining a dimension table into the fact table is a valid way to widen a table for reporting, trading storage for fewer joins at query time.