0

I have two tasks T1 and T2. T1 runs every day at 7:00 hours and it is the predecessor of T2.

I am able to use the task execution history for T1. However, the history of T2 doesn't show up in the results.

Is there a way I can track whether the second task executed or not?

Best, Vijay Prakash


Update:

Here is the query I used to query task execution status:

select *
  from table(information_schema.task_history(
    result_limit => 10,
    task_name=>'T2'));

2 Answers2

0

Can you give us a hit of how you are attempting to track tasks? Should be able to track tasks and more using combinations of the below.

SELECT *
FROM TABLE(information_schema.task_history(RESULT_LIMIT => 10000))

SELECT *
FROM TABLE(information_schema.QUERY_HISTORY_BY_WAREHOUSE(WAREHOUSE_NAME => 'WH_FOR_TASKS', RESULT_LIMIT => 10000))

Thanks.

Abhishek
  • 1,742
  • 2
  • 14
  • 25
Tim
  • 1
  • Updated my question. I was always using that query. But I still don't see the results for T2. Also, I don't think I will be able to find my task in query history within a decent amount of time :) – Vijay Prakash Jan 30 '20 at 16:38
  • The result_limit parameter is extremely low. What happens if you increase to the 10,000 maximum? – Tim Jan 30 '20 at 17:37
  • And maybe drop the task_name parameter just for kicks. – Tim Jan 30 '20 at 17:39
  • The task is scheduled to run just once per day and it was scheduled couple of days before. Hence, the result limit is set to 10. However, I will try with 10000. Thanks. – Vijay Prakash Jan 31 '20 at 09:22
  • Thanks, Tim. I was able to figure out the issue. – Vijay Prakash Feb 07 '20 at 15:12
0

The root cause of the above issue is, the order of starting the jobs was incorrect. I had resumed the first task (T1) before the second one (T2) which was why the second task was not executed.