ExamGecko
Question list
Search
Search

List of questions

Search

Question 77 - DEA-C01 discussion

Report
Export

To troubleshoot data load failure in one of your Copy Statement, Data Engineer have Executed a COPY statement with the VALIDATION_MODE copy option set to RETURN_ALL_ERRORS with reference to the set of files he had attempted to load. Which below function can facilitate analysis of the problematic records on top of the Results produced? [Select 2]

A.
RESULT_SCAN
Answers
A.
RESULT_SCAN
B.
LAST_QUERY_ID
Answers
B.
LAST_QUERY_ID
C.
Rejected_record
Answers
C.
Rejected_record
D.
LOAD_ERROR
Answers
D.
LOAD_ERROR
Suggested answer: A, B

Explanation:

LAST_QUERY_ID() Function

Returns the ID of a specified query in the current session. If no query is specified, the most recently executed query is returned.

RESULT_SCAN() Function

Returns the result set of a previous command (within 24 hours of when you executed the query) as if the result was a table.

The following example validates a set of files (SFfile.csv.gz) that contain errors. To facilitate analy-sis of the errors, a COPY INTO <location> statement then unloads the problematic records into a text file so they could be analyzed and fixed in the original data files. The statement queries the RESULT_SCAN table.

1. #copy into Snowtable

2. from @SFstage/SFfile.csv.gz

3. validation_mode=return_all_errors;

4. #set qid=last_query_id();

5. #copy into @SFstage/errors/load_errors.txt from (select rejected_record from table( result_scan($qid))); Note: Other options are not valid functions.

asked 23/09/2024
SAI CHARAN TANGELLA
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first