LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


In a data engineering project, you are working with a DataFrame named 'df_sales' that contains sales data. The DataFrame includes columns 'date' (in 'yyyy-MM-dd' format), 'product_id', 'quantity_sold', and 'revenue'. Your task is to transform the 'date' column into a struct type with separate fields for 'year', 'month', and 'day' to facilitate easier date-based analysis. Considering the need for efficiency and correctness in Spark SQL, which of the following queries best accomplishes this task? Choose the correct option.

Simulated




Powered ByGPT-5