A data engineer loads a Unity Catalog managed table from a cloud object storage folder using COPY INTO. The first run ingests the twelve JSON files present in the folder. A partner then adds three further files to the same folder, and the engineer runs the identical COPY INTO statement again without changing any option. What does the second run load into the table?
COPY INTO prod.raw.events
FROM 's3://landing/events/'
FILEFORMAT = JSON- AAll fifteen files, because COPY INTO rescans the source folder and rewrites the target table from the complete file listing on every run.
- BAll fifteen files, because file tracking applies only when a PATTERN clause narrows the source folder to a subset of the files it contains.
- COnly the three new files, because COPY INTO records which files it has already ingested and skips them on subsequent runs against the same target table. Correct
- DNothing at all, because the target table already exists and COPY INTO refuses to append to a table it has previously written to without a force option.
Why A is wrong: This is tempting because the statement does name the whole folder each time, but COPY INTO appends incrementally and does not rewrite the target from the full listing.
Why B is wrong: PATTERN is a real clause and does filter which files are considered, but it plays no part in whether already-ingested files are skipped, so this reasoning is wrong.
Why C is correct: Correct. COPY INTO keeps per-target metadata of the source files it has already ingested, so a repeated run picks up only files it has not seen before.
Why D is wrong: Tempting because a force option does exist, but its role is to clear the load history and reprocess, not to permit any append at all, so a plain rerun still loads new files.