21. Given a STRUCT column named 'payload' containing a field 'date', how do you access that field in SQL? | Databricks Certified Data Engineer - Associate Quiz - LeetQuiz
Databricks Certified Data Engineer - Associate
Explanation:
In Spark SQL, fields within a STRUCT column are accessed using dot notation (column_name.field_name). Therefore, payload.date is the correct syntax.
Get started today
Ultimate access to all questions.
Given a STRUCT column named 'payload' containing a field 'date', how do you access that field in SQL?