🔥 3-day streak
Microsoft Fabric Data Engineer Associate99 / 144
Question 99 of 144
A data engineer is preparing a Lakehouse table for a Power BI report in Microsoft Fabric. The source table 'sales_long' stores one row per product category per month with columns: StoreID, Month, Category, and Revenue. The reporting team needs a wide table where each distinct Category becomes its own column (with Revenue as the value), keeping one row per StoreID and Month. The number of categories is small and stable. Which PySpark transformation should the engineer use in a notebook to produce this shape?
Reviewed for accuracy · Report an issueNext question