Published · By Henry Palma
Databricks Data Engineer Associate Practice Quiz, Lesson 4: Auto Loader Schema Evolution
Practice quiz for the Databricks Data Engineer Associate exam, Lesson 4: addNewColumns, rescue mode, schema hints, and mergeSchema on the Delta write.
Exam-style question: An Auto Loader stream runs with the default settings, and a new file arrives with an extra column. What happens on the next run? The stream fails once, after Auto Loader records the new column at the schema location. Restart it, and the new column is picked up. This post is the practice quiz companion to Lesson 4 of the Databricks Data Engineer Associate exam prep series, in Section 2 of the August 2026 exam guide, Data Ingestion and Loading (21% of the exam).

Watch the full Lesson 4: Auto Loader Schema Evolution video if you want the walkthrough, then use this quiz to check yourself.
The written lesson companion is here: Lesson 4: Auto Loader Schema Evolution.
The notebook and cheat sheet are in the A04 folder on GitHub. The PDF cheat sheet is in the same folder.
This is independent study material, not official Databricks training. The eight questions below are original practice items written by Build and Teach from the public exam guide and Databricks documentation. They are not real exam questions and are not affiliated with or endorsed by Databricks.
What this quiz covers
Auto Loader can infer and evolve a schema when you set cloudFiles.schemaLocation. That location stores the inferred schema in a _schemas folder so later runs can track changes. The default evolution mode is addNewColumns. When a new column appears, the stream fails once with an unknown field error after the column is recorded, and a restart loads it. The Delta table still needs mergeSchema on the write, or the restart fails at the table with a schema mismatch.
The other mode that shows up often is rescue. Rescue never evolves the schema and never fails. Values for unexpected columns go into the rescued data column. If you provide a full schema with .schema(...) and set no mode, the default becomes none, and addNewColumns is not allowed. New columns are ignored.
For CSV, JSON and XML, Auto Loader infers every column as a string unless you set cloudFiles.inferColumnTypes to true. Schema hints pin types you already know on top of inference, and they can add a column not seen yet. Hints do not work together with a full .schema(...). A type mismatch, such as N/A in a decimal amount, does not fail the read when a rescued data column is present. The row loads with a null amount, and the original value is kept in rescueddata.
Pause the video when the timer shows, pick A, B, C or D, then check the answer. Seven or more of the eight questions right means you are ready for this section.
Practice questions from the quiz video
These are the eight questions from the quiz video, with answers and explanations.
Question 1
An Auto Loader stream runs with default settings. A new file arrives with an extra column. What happens on the next run?
- A) The column is added and the file loads on that run
- B) The stream fails once; a restart picks up the column
- C) The new column is ignored
- D) The column goes to rescueddata and the stream keeps running
Answer: B. The default mode, addNewColumns, fails with an UnknownFieldException after it records the column at the schema location. The restart loads it.
Question 2
For CSV and JSON files, what types does Auto Loader infer by default?
- A) Integers and doubles
- B) The same types as the regular Spark reader
- C) Every column as a string
- D) Whatever is listed in .schema(...)
Answer: C. CSV, JSON and XML columns are inferred as strings, so a changing value cannot break a type later. Set cloudFiles.inferColumnTypes to true for real types.
Question 3
Which Auto Loader option turns on schema inference and schema evolution?
- A) cloudFiles.schemaLocation
- B) cloudFiles.format
- C) trigger(availableNow=True)
- D) rescuedDataColumn
Answer: A. The schema location is where Auto Loader stores the inferred schema, in a _schemas folder, so it can track changes over time.
Question 4
A stream uses schemaEvolutionMode rescue. A file arrives with a new column. What happens?
- A) It fails once, then adds the column
- B) It stays failed until you update the schema
- C) It never fails and never adds the column
- D) The table gains the column without mergeSchema
Answer: C. Rescue mode never evolves the schema and never fails. The new column's values go into the rescued data column.
Question 5
You provide a full schema with .schema(...) and set no mode. Which schema evolution mode applies?
- A) addNewColumns
- B) rescue
- C) failOnNewColumns
- D) none
Answer: D. With a provided schema, the default mode becomes none, and addNewColumns is not allowed. New columns are ignored.
Question 6
After the restart, the stream carries a new channel column. Which line lets orders_bronze accept it?
(spark.readStream.format("cloudFiles")
.option("cloudFiles.format", "csv")
.option("cloudFiles.schemaLocation", chk).load(src)
.writeStream.option("checkpointLocation", chk)
.option("mergeSchema", "true")
.trigger(availableNow=True).toTable("orders_bronze"))
- A) cloudFiles.schemaLocation
- B) mergeSchema = "true"
- C) checkpointLocation
- D) trigger(availableNow=True)
Answer: B. mergeSchema on the write lets the Delta table gain the new column. Without it, the restart fails at the table with a schema mismatch.
Question 7
A schema hint sets amount DECIMAL(10,2). Order 1005 has amount N/A. What happens to that row?
- A) The stream fails
- B) The row is dropped
- C) It loads with a NULL amount, and N/A is kept in rescueddata
- D) The amount is stored as the string N/A
Answer: C. A type mismatch does not fail the read when there is a rescued data column. The original value is kept as JSON, with the source file path.
Question 8
Which statement about cloudFiles.schemaHints is true?
- A) Hints replace schema inference completely
- B) Hints apply on top of inference and can add a column not seen yet
- C) Hints work together with a full .schema(...)
- D) Hints switch the mode to none
Answer: B. Hints pin the types you know on top of the inferred schema, and evolution still works. They only work when you do not provide a full schema.
Practical tips
The memory trick from the video: default fails once, then adds. Rescue never fails, never adds.
On a code question, look for two locations. cloudFiles.schemaLocation is what turns inference and evolution on. mergeSchema on the write is what lets the Delta table actually gain the column.
If the question says you provided a full .schema(...), do not pick addNewColumns. The default mode becomes none.
Key takeaways
- Default mode,
addNewColumns, fails once when a new column appears, then a restart adds it. The write still needsmergeSchema. - Rescue mode never fails and never adds the column. Unexpected values go to the rescued data column.
- A provided
.schema(...)switches the default mode tonone. New columns are ignored. - CSV, JSON and XML columns are inferred as strings unless
cloudFiles.inferColumnTypesis true. - Schema hints sit on top of inference. They do not replace a full schema, and they do not combine with
.schema(...).
Check your understanding
1. You want Auto Loader to infer the schema and track changes over time. Which option must you set?
- A)
cloudFiles.format - B)
cloudFiles.schemaLocation - C)
trigger(availableNow=True) - D)
rescuedDataColumn
2. A stream uses schemaEvolutionMode rescue. A file arrives with a new channel column. What happens to the table schema?
- A) The table gains
channelon that run - B) The stream fails once, then the restart adds
channel - C) The schema does not change, and
channelvalues go to the rescued data column - D) The stream stays failed until you add
channelby hand
3. You provide a full schema with .schema(...) and set no evolution mode. A later file has a new column. What happens?
- A)
addNewColumnsapplies, and the stream fails once - B) The new column is ignored, because the default mode is
none - C) The new column is added automatically
- D) The stream cannot start, because a provided schema is not allowed
4. For JSON files, Auto Loader infers types as strings. How do you infer real types instead?
- A) That is the default, so do nothing
- B) Set
cloudFiles.inferColumnTypesto true - C) Add
.schema(...)andaddNewColumns - D) Set
multiLineto true
5. After a default-mode restart, the stream now includes a new column, but the write still fails. What is usually missing?
- A)
cloudFiles.schemaLocation - B)
checkpointLocation - C)
mergeSchemaon the write - D)
cloudFiles.schemaHints
Answer key
- B. The schema location is where Auto Loader stores the inferred schema so it can track changes.
- C. Rescue never evolves the schema and never fails. The new column's values go into the rescued data column.
- B. With a provided schema, the default mode is
none, andaddNewColumnsis not allowed. - B. Set
cloudFiles.inferColumnTypesto true when you want inferred types other than string. - C. Auto Loader can add the field to the stream schema, but the Delta table still needs
mergeSchemato accept it.