Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Data Engineer Associate · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- Correct answer : A — One row per distinct combination of `region` and `product_category`, each with the summed `units_sold` for that combination A . Correct — grouping by both `region` and `product_category` produces one output row per unique combination of those two columns, each carrying the sum of `units_sold` for that specific group. B . `groupBy().agg()` collapses rows within each group into a single summary row per group; it does not preserve one row per original input row or compute a running total across rows. C . Both `region` and `product_category` were passed to `groupBy`, so the result is grouped by their combination, not by `region` alone, and the aggregated `units_sold` column is retained in the output. D . Because two grouping columns were specified, the aggregation is computed separately for each combination of `region` and `product_category` rather than collapsing to one overall grand total.