ExamGecko
Question list
Search
Search

List of questions

Search

Question 55 - ARA-C01 discussion

Report
Export

An Architect uses COPY INTO with the ON_ERROR=SKIP_FILE option to bulk load CSV files into a table called TABLEA, using its table stage. One file named file5.csv fails to load. The Architect fixes the file and re-loads it to the stage with the exact same file name it had previously.

Which commands should the Architect use to load only file5.csv file from the stage? (Choose two.)

A.
COPY INTO tablea FROM @%tablea RETURN_FAILED_ONLY = TRUE;
Answers
A.
COPY INTO tablea FROM @%tablea RETURN_FAILED_ONLY = TRUE;
B.
COPY INTO tablea FROM @%tablea;
Answers
B.
COPY INTO tablea FROM @%tablea;
C.
COPY INTO tablea FROM @%tablea FILES = ('file5.csv');
Answers
C.
COPY INTO tablea FROM @%tablea FILES = ('file5.csv');
D.
COPY INTO tablea FROM @%tablea FORCE = TRUE;
Answers
D.
COPY INTO tablea FROM @%tablea FORCE = TRUE;
E.
COPY INTO tablea FROM @%tablea NEW_FILES_ONLY = TRUE;
Answers
E.
COPY INTO tablea FROM @%tablea NEW_FILES_ONLY = TRUE;
F.
COPY INTO tablea FROM @%tablea MERGE = TRUE;
Answers
F.
COPY INTO tablea FROM @%tablea MERGE = TRUE;
Suggested answer: B, C

Explanation:

Option A (RETURN_FAILED_ONLY)will only load files that previously failed to load.Since file5.csv already exists in the stage with the same name,it will not be considered a new file and will not be loaded.

Option D (FORCE)will overwrite any existing data in the table.This is not desired as we only want to load the data from file5.csv.

Option E (NEW_FILES_ONLY)will only load files that have been added to the stage since the last COPY command.This will not work because file5.csv was already in the stage before it was fixed.

Option F (MERGE)is used to merge data from a stage into an existing table,creating new rows for any data not already present.This is not needed in this case as we simply want to load the data from file5.csv.

Therefore, the architect can use either COPY INTO tablea FROM @%tablea or COPY INTO tablea FROM @%tablea FILES = ('file5.csv') to load only file5.csv from the stage. Both options will load the data from the specified file without overwriting any existing data or requiring additional configuration

asked 23/09/2024
Antonio Pombo
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first