Is there a simple way to retrieve a scalar result from a Snowflake stored procedure within another stored procedure?
I would like to use one stored procedure to generate a complex SQL statement and fire that SQL statement into another procedure.
CREATE OR REPLACE PROCEDURE GENERATE_SQL( )
RETURNS VARCHAR
LANGUAGE JAVASCRIPT
AS
$$
return "SELECT 'Hello world'";
$$
;
Having the SQL generation in a separate procedure would allow me to more easily maintain/unit test that bit.