Executing a Stored Procedure in Snowflake: A Step-by-Step Guide

In order to resume or suspend a task, it is necessary to have either the OWNERSHIP or OPERATE privilege. The EXECUTE TASK privilege is granted by the ACCOUNT ADMIN through the OWNERSHIP role. Additional information can be found at https://docs.snowflake.com/en/sql-reference/sql/alter-task.html.
Another solution involves executing https://docs.snowflake.com/en/sql-reference/sql/create-task.html after creating the task.
For the database object, please use the full identifier, such as the Stored Proc.
As mentioned by Dean, the two queries can be merged.
There are no major errors, but adding a semicolon after the call get_columns(‘Table_Name’) may be helpful.

Solution 1:

Merely initiating a task does not suffice. It is imperative to proceed with resuming it since tasks are set to be in a “suspended” state by default.

In your case the statement is

ALTER TASK mytask_hour resume;

Your schedule dictates the timing of the tasks.

Additionally, it is important to bear in consideration that.

  • To resume or suspend a task, one must possess either the OWNERSHIP or OPERATE privilege for the task.
  • The EXECUTE TASK privilege, which allows for task execution, can be assigned to the OWNERSHIP-role by the ACCOUNT ADMIN.

Refer to the following link for additional information: https://docs.snowflake.com/en/sql-reference/sql/alter-task.html

Solution 2:

Once a task has been created, it is necessary to carry it out.


The Snowflake documentation provides information on how to create a task using SQL.

I hope this helps…Rich

If any response is useful to you, please consider acknowledging it by clicking the check mark next to the answer to switch it from “greyed out” to “filled in” and accepting it.

Frequently Asked Questions