← BuildandTeach Tech Tutorials posts

Published · By Henry Palma

Databricks Data Engineer Associate Practice Quiz, Lesson 3: COPY INTO Incremental Loading

Practice quiz for the Databricks Data Engineer Associate exam, Lesson 3: COPY INTO file history, force reloads, mergeSchema, and Auto Loader at scale.

Databricks Data Engineer Associate Practice Quiz, Lesson 3: COPY INTO Incremental Loading

Exam-style question: The same COPY INTO command runs again, and no new files arrived. How many rows does the next run load? Zero. COPY INTO remembers which files it already loaded into the table and skips them. This post is the practice quiz companion to Lesson 3 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 on YouTube

Video thumbnail
Video thumbnail

Watch the full Lesson 3: COPY INTO Incremental Loading video if you want the walkthrough, then use this quiz to check yourself.

The written lesson companion is here: Lesson 3: COPY INTO Incremental Loading.

The notebook and cheat sheet are in the A03 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

COPY INTO is a SQL command that loads files into an existing Delta table and remembers what it already loaded into that table. Run it again with no new files, and it loads zero rows. That is what makes it idempotent and safe to schedule. The target table must already exist. It can be an empty placeholder with no columns, and COPY INTO fills in the schema.

File history is kept per target table, and it is based on the files that were loaded, not on the file contents. If someone edits a file that was already loaded and keeps the same name, the next run skips it. Point a brand new table at the same folder, and both files load, because the new table has its own history.

COPYOPTIONS ('force' = 'true') turns that memory off, so every file loads again, duplicates included. VALIDATE only checks the data and writes nothing. To let the target table gain a new column, put mergeSchema in COPYOPTIONS. In FORMAT_OPTIONS it only merges the schemas of the source files. If your SELECT lists specific columns, a new source column is not added.

COPY INTO fits thousands of files. When two million new files land every day, Auto Loader is the better tool, because it discovers files with fewer operations and can split the work into batches.

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

COPY INTO loaded two files into orders_copy. You run the same command again, and no new files arrived. What happens?

  • A) Both files load again, with duplicates
  • B) Zero rows are loaded
  • C) Only the newest file loads again
  • D) The command fails

Answer: B. COPY INTO remembers which files it already loaded into that table and skips them. That makes it idempotent and safe to rerun.

Question 2

Before COPY INTO can load files, what must already exist?

  • A) The target table
  • B) A checkpoint location
  • C) A streaming table
  • D) A schema location option

Answer: A. COPY INTO loads into an existing Delta table. It can even be an empty placeholder with no columns, and COPY INTO fills in the schema.

Question 3

Someone edits orders_day1.csv, which was already loaded, and keeps the same name. What does the next COPY INTO do with it?

  • A) Loads the edited rows
  • B) Skips it
  • C) Replaces the old rows
  • D) Fails with an error

Answer: B. The file was already loaded into this table, so it is skipped, even after an edit. Only new files load.

Question 4

Which setting makes COPY INTO load every file again, duplicates included?

  • A) FORMAT_OPTIONS ('mergeSchema' = 'true')
  • B) COPY_OPTIONS ('force' = 'true')
  • C) PATTERN = '*.csv'
  • D) VALIDATE

Answer: B. force = true turns idempotency off, so every file loads again. VALIDATE only checks the data and writes nothing.

Question 5

A new file adds a channel column. Which setting lets the target table's schema gain that column?

  • A) mergeSchema in FORMAT_OPTIONS only
  • B) mergeSchema in COPY_OPTIONS
  • C) header in FORMAT_OPTIONS
  • D) A FILES list

Answer: B. mergeSchema in COPYOPTIONS lets the target table's schema evolve. In FORMATOPTIONS it only merges the schemas of the source files.

Question 6

A day 3 file adds 2 rows and a new channel column. You rerun this. What happens?

-- orders_copy already has 5 rows (day 1 and day 2)
COPY INTO orders_copy
FROM (SELECT CAST(order_id AS INT) AS order_id, customer,
        CAST(amount AS DOUBLE) AS amount, CAST(order_date AS DATE) AS order_date,
        _metadata.file_name AS source_file FROM '/Volumes/.../landing/orders')
FILEFORMAT = CSV FORMAT_OPTIONS ('header' = 'true')
  • A) 2 inserted, 7 total, no channel
  • B) 7 inserted, 12 total
  • C) 2 inserted, channel added
  • D) Fails: schema mismatch

Answer: A. Only the day 3 file is new for this table, so 2 rows load. The SELECT lists exactly which columns to load, so channel is not added.

Question 7

A new empty table, ordersauto, runs COPY INTO on the same folder. Both files went into orderscopy. What loads?

  • A) Nothing, the files were already loaded
  • B) Only the newest file
  • C) Both files
  • D) It fails because the table has no columns

Answer: C. Load history is kept per target table. A new table has its own history, so both files load, and COPY INTO fills in the empty table's schema.

Question 8

Two million new files land every day. Which tool fits best?

  • A) COPY INTO with force = true
  • B) Auto Loader
  • C) COPY INTO with a FILES list
  • D) A scheduled CREATE TABLE AS SELECT

Answer: B. For millions of files, Auto Loader discovers files with fewer operations and splits work into batches. COPY INTO fits thousands of files.

Practical tips

The memory trick from the video is short: COPY INTO remembers. Force forgets.

When a question mentions a new column, check two places: whether mergeSchema is in COPY_OPTIONS, and whether the SELECT list includes that column. A listed SELECT will not add a column you did not project.

If the scenario jumps to millions of files a day, do not stay with COPY INTO. That is the Auto Loader scale question.

Key takeaways

  • COPY INTO skips files it already loaded into that table, so a rerun with no new files loads zero rows.
  • The target table must exist. An empty table is fine, and COPY INTO can fill in its schema.
  • Editing an already loaded file, and keeping the same name, does not make it load again. A new target table has its own history.
  • force = true reloads every file and can create duplicates. mergeSchema belongs in COPY_OPTIONS to evolve the target table.
  • Use Auto Loader when the daily file count is in the millions.

Check your understanding

1. You schedule the same COPY INTO every hour against a folder of a few thousand CSV files. One hour, nothing new arrives. How many rows load?

  • A) All of the files load again
  • B) Zero
  • C) Only files that were edited
  • D) The command fails because the folder is unchanged

2. ordersraw already has the day 1 and day 2 files. You create ordersraw_v2 as a new empty table and run COPY INTO on the same folder. What loads?

  • A) Nothing, those files were already loaded into orders_raw
  • B) Only day 2
  • C) Both files, because load history is per target table
  • D) The command fails, because the new table has no columns

3. Which option should you avoid on a scheduled COPY INTO if you must not create duplicate rows?

  • A) FORMAT_OPTIONS ('header' = 'true')
  • B) COPY_OPTIONS ('force' = 'true')
  • C) PATTERN = '*.csv'
  • D) VALIDATE

4. A new file adds a region column. Your command uses mergeSchema in FORMAT_OPTIONS only, and the SELECT lists the old columns. What happens to region on the target table?

  • A) The target table gains region
  • B) The target table does not gain region
  • C) The command fails on a schema mismatch
  • D) region is stored in rescueddata

5. Two million new event files land every day. Which tool fits best?

  • A) COPY INTO with a FILES list
  • B) COPY INTO with force = true
  • C) Auto Loader
  • D) A scheduled CREATE TABLE AS SELECT of the whole folder

Answer key

  1. B. COPY INTO remembers the files already loaded into that table and skips them.
  2. C. History is per table. The new table has none, so both files load, and COPY INTO can fill in the empty schema.
  3. B. force = true reloads every file, duplicates included. VALIDATE writes nothing, so it would not create duplicates.
  4. B. mergeSchema in FORMATOPTIONS only merges source file schemas. The SELECT also omits region, so the target table does not gain the column. Use mergeSchema in COPYOPTIONS and project the column when you want it added.
  5. C. Auto Loader is the better fit at millions of files a day. COPY INTO fits thousands of files.

Have an idea, question, or feedback?

We'd genuinely like to hear from you.