
Answer-first summary for fast verification
Answer: The previous day's file has already been copied into the table.
The COPY INTO command in Databricks is designed to be idempotent - it tracks which files have already been copied and won't copy them again. When the data engineer runs the same COPY INTO command daily, if the previous day's file has already been processed, the command will recognize this and not copy the same file again, resulting in no new records being added to the table. **Key Points:** - COPY INTO automatically tracks copied files using file metadata - It prevents duplicate data ingestion - The command syntax is correct (FILEFORMAT = PARQUET is valid) - No refresh is needed to see copied rows - The FILES keyword is optional when you want to copy all files from a directory - PARQUET format does support COPY INTO - The issue is likely that the file was already processed in a previous run
Author: Keng Suppaseth
Ultimate access to all questions.
No comments yet.
A data engineer runs a statement every day to copy the previous day's sales into the table transactions. Each day's sales are in their own file in the location "/transactions/raw". Today, the data engineer runs the following command to complete this task:
COPY INTO transactions
FROM "/transactions/raw"
FILEFORMAT = PARQUET;
COPY INTO transactions
FROM "/transactions/raw"
FILEFORMAT = PARQUET;
After running the command today, the data engineer notices that the number of records in table transactions has not changed. Which of the following describes why the statement might not have copied any new records into the table?
A
The format of the files to be copied were not included with the FORMAT_OPTIONS keyword.
B
The names of the files to be copied were not included with the FILES keyword.
C
The previous day's file has already been copied into the table.
D
The PARQUET file format does not support COPY INTO.
E
The COPY INTO statement requires the table to be refreshed to view the copied rows.