The example prints out the ID and name from the row returned by the SELECT statement. Within the outermost block (and outside any of the nested blocks), PV_NAME resolves to the parameter passed to the stored The size of string or binary variables is limited to 256 bytes. Discover the subtle nuances of variables when using Snowflake Stored Procedures/Snowflake Scripting. of the declared object is that block and any blocks nested in that block. SQL variables are globally identified using case-insensitive names. Snowflake supports generating and executing dynamic queries in stored procedures. For example, you could build a SQL command string that contains a mix of pre-configured SQL and user inputs such as procedure parameters. [1]: # Initializing the extended session from ice_pick import extend_session from snowflake.snowpark import Session import configparser # Create the connection and extend the session with . |, -- case-insensitive table name specified in a string containing the fully-qualified name, -- case-sensitive table name specified in a double-quoted string, ---------------------------------+----------+---------------+-------------+-------+---------+------------+------+-------+----------+----------------+, | created_on | name | database_name | schema_name | kind | comment | cluster_by | rows | bytes | owner | retention_time |, | Tue, 05 Dec 2017 12:16:18 -0800 | MY_TABLE | MY_DB | MY_SCHEMA | TABLE | | | 0 | 0 | SYSADMIN | 1 |, | Tue, 05 Dec 2017 12:16:59 -0800 | my_table | MY_DB | MY_SCHEMA | TABLE | | | 0 | 0 | SYSADMIN | 1 |. I haven't found a way to do this, but there are a few options to get close at least. when the CREATE PROCEDURE command is executed), the cursor has not been of the declared object is that block and any blocks nested in that block. See similar post from the snowflake community: https://community.snowflake.com/s/question/0D50Z00009Uu3cTSAR/debugging-procedures-technicques-print-std-out-etc). CALL PassingQueryResultsSP(); Let's call this stored procedure and check the results. In Snowflake SQL statements, in addition to referring to objects by name (see Identifier Requirements), you can also use a string literal, session variable, bind variable, or Snowflake Scripting variable to refer to an object.