SYSTEM$CURRENT_USER_TASK_NAME
functionsupportedUDFs, procedures, tasks, alerts, scripting
docs.snowflake.com ↗
Returns the name of the task currently executing when invoked from the statement or stored procedure defined by the task.
Syntax
SYSTEM$CURRENT_USER_TASK_NAME()