This behavior change is in the 2022_04 bundle. The bundle was first introduced disabled by default in the 6.21 behavior change release.
For the most up-to-date status of the bundle, as well as other release-related details, see the Behavior Change Log.
The user error messages returned when attempting invalid SQL actions related to serverless tasks (i.e. tasks that run using Snowflake-managed compute resources) have changed as follows:
Use Case | Current Error Message Text | Pending Error Message Text |
---|
Using a role that is not granted the global EXECUTE MANAGED TASK privilege, execute a CREATE TASK statement and omit the WAREHOUSE parameter. | Missing option(s): [WAREHOUSE] | WAREHOUSE not specified and missing serverless task privilege to create task {task name}. To create it as a user-managed task, specify a WAREHOUSE. To create it as a serverless task, execute the CREATE TASK command with a role that has been granted the 'EXECUTE MANAGED TASK' account-level privilege. |
Using a role that is not granted the global EXECUTE MANAGED TASK privilege, clone a serverless task (or a database or schema that contains one or more serverless tasks) using the appropriate CREATE … CLONE command. | Task {task name} requires a warehouse. | WAREHOUSE not specified and missing serverless task privilege to create task {task name}. To create it as a user-managed task, specify a WAREHOUSE. To create it as a serverless task, execute the CLONE command with a role that has been granted the 'EXECUTE MANAGED TASK' account-level privilege. |
Using a role that is not granted the global EXECUTE MANAGED TASK privilege, unset the WAREHOUSE parameter for an existing task that runs using customer-managed compute resources (using an ALTER TASK … UNSET WAREHOUSE statement). | Task {task name} requires a warehouse. | Cannot UNSET WAREHOUSE on task {task_name} because its owner role has not been granted the 'EXECUTE MANAGED TASK' account-level privilege. Grant this privilege to the role or use GRANT OWNERSHIP to change the task's owner role to one with this privilege. |
- Using a role is granted the global EXECUTE MANAGED TASK privilege (along with other minimum privileges), create and resume a serverless task.
- The EXECUTE MANAGED TASK privilege is revoked from the owner role (the role that has the OWNERSHIP privilege on the task).
- The task is not paused and starts its next scheduled run, or a user with the owner role executes the EXECUTE TASK command to attempt to start a task run.
| Cannot execute task, USAGE privilege on the task’s warehouse must be granted to the owner role | Cannot execute task, EXECUTE MANAGED TASK privilege must be granted to the owner role |
This change is intended to help you better understand and resolve issues related to serverless tasks.
Ref: 737