Marcel
Marcel

Reputation: 2612

Task without Virtual Warehouse: Is the query failing or the task not starting?

When you create a task in Snowflake, you also have to pass a Virtual Warehouse that is used for the execution.

CREATE [ OR REPLACE ] TASK [ IF NOT EXISTS ] <name>
  WAREHOUSE = <string>
...

Regarding this topic I wondered about the scenario when someone drops the Virtual Warehouse later.

DROP WAREHOUSE <name>

Will the task start anyway and the query fails (because it has no associated warehouse) or will the task not even start because of the missing warehouse in his definition?

My expectation is that the task is starting but the query fails immediately.

More information about creating tasks: https://docs.snowflake.com/en/sql-reference/sql/create-task.html

Upvotes: 0

Views: 327

Answers (1)

Sriga
Sriga

Reputation: 1321

Your task will be fail with error "Cannot execute task , USAGE privilege on the task's warehouse must be granted to owner role", also you can check task execution status under:

select *
from table(information_schema.task_history()) 
where DATABASE_NAME = 'DEMO_DB'
order by scheduled_time;

Upvotes: 1

Related Questions