DEA-C02 · Question #111
What considerations should a Data Engineer make when leveraging the table function TASK_HISTORY? (Choose two.)
The correct answer is B. For the task of interest to be returned, it must have been triggered within the last 30 days. C. A user querying the table function must be the owner of the task or have elevated privileges. B and C are correct because Snowflake's TASK_HISTORY table function enforces both a time-based window and access control restrictions. Tasks must have been triggered within the last 30 days to appear in results - anything older is outside the queryable window. Additionally…
Question
What considerations should a Data Engineer make when leveraging the table function TASK_HISTORY? (Choose two.)
Options
- AQuerying TASK_HISTORY will return only in progress or completed task executions.
- BFor the task of interest to be returned, it must have been triggered within the last 30 days.
- CA user querying the table function must be the owner of the task or have elevated privileges.
- DA parameter must be provided during execution because is a
- EAny parameters used in the TASK_HISTORY table function will take precedent before SQL limiting
How the community answered
(21 responses)- A5% (1)
- B90% (19)
- D5% (1)
Explanation
B and C are correct because Snowflake's TASK_HISTORY table function enforces both a time-based window and access control restrictions. Tasks must have been triggered within the last 30 days to appear in results - anything older is outside the queryable window. Additionally, only the task owner or a user with elevated privileges (such as ACCOUNTADMIN or the MONITOR EXECUTION privilege) can retrieve task history, making C a critical security consideration.
Why the distractors are wrong:
- A is incorrect because
TASK_HISTORYreturns tasks across all states - including failed, skipped, cancelled, and scheduled - not just in-progress or completed. - D is incorrect (and appears to be an incomplete sentence);
TASK_HISTORYparameters such asSCHEDULED_TIME_RANGE_STARTare optional, not required. - E is incorrect; SQL
LIMITclauses andWHEREfilters operate on the result set after the function returns data - they do not "take precedence" over the function's own parameters in any special way.
Memory tip: Think "OWN it, TIME it" - you must own the task (or have privileges), and the task must fall within the time window. If either condition isn't met, you won't see the results you need.
Topics
Community Discussion
No community discussion yet for this question.