QuestionQ38

VerifiedOfficial exam objectives/topics

Which query displays the 20 most recent executions of the specified task, MYTASK, that were scheduled during the past hour and have either completed or are still running?

Explanation

TASK_HISTORY can be limited to executions scheduled within the previous hour using SCHEDULED_TIME_RANGE_START, restricted to MYTASK, and capped at 20 rows with RESULT_LIMIT. Filtering with WHERE QUERY_ID IS NOT NULL returns only executions that have started; therefore, it includes completed and currently executing tasks while excluding merely scheduled future runs. Snowflake documents this filter specifically for retrieving tasks that are completed or still running.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!