Databricks-DE-Pro Data Ingestion and Acquisition Practice Question
A data engineer is using Auto Loader to ingest JSON files from cloud storage into a Delta table. The files contain a nested field 'address' with subfields 'city' and 'zip'. The engineer wants to flatten the nested structure during ingestion so that 'city' and 'zip' become top-level columns in the Bronze table. Which Auto Loader feature should be used to achieve this?
⚠ Common exam trap
The trap here is assuming that Auto Loader has a configuration option to flatten nested data automatically, when in fact flattening must be done via DataFrame operations after ingestion.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Apply a select transformation with col('address.city') and col('address.zip') after reading the stream.
Auto Loader ingests data with its original nested structure. To flatten nested fields into top-level columns, you must apply DataFrame transformations after reading the stream. Using select or withColumn to extract subfields like address.city and address.zip is the correct method. Auto Loader does not have a built-in flattening feature, so transformations are required.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Apply a select transformation with col('address.city') and col('address.zip') after reading the stream.
Why this is correct
Auto Loader does not have a built-in flattening option; flattening is achieved through DataFrame transformations. After reading the stream with Auto Loader, you can use select or withColumn to extract nested fields into top-level columns. For example, selecting col('address.city').alias('city') and col('address.zip').alias('zip') will produce the desired flat schema. This is the standard approach for flattening nested data during ingestion.
- ✗
Set cloudFiles.flattenNested to true in the Auto Loader options.
Why it's wrong here
There is no option called cloudFiles.flattenNested in Auto Loader. Auto Loader does not provide automatic flattening of nested structures. This is a fictitious option and would cause an error or be ignored. The correct way to flatten is to apply transformations after reading. Relying on non-existent options is a common mistake.
- ✗
Use the cloudFiles.schemaEvolutionMode set to 'addNewColumns' to automatically flatten nested fields.
Why it's wrong here
Schema evolution mode 'addNewColumns' handles new columns appearing in the data, but it does not flatten nested fields. It only adds new top-level columns when they are detected. Nested fields remain nested. This mode is about adapting to schema changes, not restructuring data. It would not produce the flattened columns 'city' and 'zip' as top-level.
- ✗
Set cloudFiles.schemaHints to specify the nested fields as top-level columns.
Why it's wrong here
Schema hints allow you to override or provide additional schema information, such as data types or missing columns. They do not flatten nested structures. You could use schema hints to define the nested schema, but the resulting DataFrame would still have the nested structure. To flatten, you need to apply transformations after reading. This option does not achieve the desired flattening.
About these practice questions
Courseiva writes every Databricks-DE-Pro question from scratch — 267 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Pro practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Pro exam.