Which query will show a list of the 20 most recent executions of a specified task, MYTASK, that have been scheduled within the last hour that have ended or are still running?
https://docs.snowflake.com/en/sql-reference/functions/task_history#examples
Note
To retrieve only tasks that are completed or still running, filter the query using WHERE query_id IS NOT NULL. Note that this filter is applied after RESULT_LIMIT already reduces the results returned, so the query could return 9 tasks if 1 task was scheduled but had not started yet.
This is a really a Bast*** Inside question, because all the stases are:
SCHEDULED: scheduled for execution.
EXECUTING: currently executing.
SUCCEEDED: execution successful.
FAILED: execution failed.
FAILED_AND_AUTO_SUSPENDED: task failed, and was automatically suspended.
CANCELLED: execution cancelled.
SKIPPED
B
To query only those tasks that have already completed or are currently running, include WHERE query_id IS NOT NULL as a filter. The QUERY_ID column in the TASK_HISTORY output is populated only when a task has started running.
https://docs.snowflake.com/en/sql-reference/functions/task_history
A - will give all the schedules even the ones that have not run yet
C - A schedule could be skipped, cancelled so it won't give all the runs
D - It won't return the most recent tasks.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
claudiamilena11
9 months, 3 weeks agoBigDataBB
1 year, 1 month agoGemnidhi17
1 year, 2 months agostopthisnow
1 year, 2 months ago