Categories:

System functions (System Information)

SYSTEM$GET_TASK_GRAPH_CONFIG

Returns the value of the configuration string for the task currently executing when invoked from the statement or stored procedure defined by the task.

Syntax

SYSTEM$GET_TASK_GRAPH_CONFIG([configuration_path])
Copy

Arguments

configuration_path

Path to the configuration value to return.

Optional argument specifying the path of the value to be retrieved. Uses the same syntax as Snowflake queries for semi-structured data. Refer to GET_PATH for more information.

Examples

-- Create a task which defines and then uses configuration
CREATE OR REPLACE TASK root_task_with_config
WAREHOUSE=mywarehouse
SCHEDULE='10 m'
CONFIG=$${"output_dir": "/temp/test_directory/", "learning_rate": 0.1}$$
AS
BEGIN
  LET OUTPUT_DIR STRING := SYSTEM$GET_TASK_GRAPH_CONFIG('output_dir')::string;
  LET LEARNING_RATE DECIMAL := SYSTEM$GET_TASK_GRAPH_CONFIG('learning_rate')::DECIMAL;
      ...
END;
Copy
Language: English