3

I want to find out the suspended tasks, the output of SHOW TASKS is too long to quickly eyeball which tasks are actually suspended (We have lots of tasks)

Is there any way to just get the names of the tasks that are suspended and filter out the ones that are actually started?

RubenLaguna
  • 21,435
  • 13
  • 113
  • 151

1 Answers1

5

You can sort by state in the Snowflake GUI result set, but it's also possible to filter/process the results of SHOW TASKS with the help of TABLE(), RESULT_SCAN() and LAST_QUERY_ID():

show tasks IN SCHEMA MYDATABASE.MYSCHEMA;
select "name","state" from TABLE(RESULT_SCAN(LAST_QUERY_ID())) where "state" <> 'started';
RubenLaguna
  • 21,435
  • 13
  • 113
  • 151