'JavaScript stored procedure API equivalent for Redshift

I am using JavaScript stored procedure API in Snowflake to get the structure of the procedures, using the following code:

   GSF1 = 'var sql_command ="<SQLCOMMAND>";
           var stmt = snowflake.createStatement({sqlText: sql_command} ); 
           var res = stmt.execute();'

What is the equivalent code of the above, which can be used in Redshift?

My requirement is to convert Snowflake stored procedures into Redshift stored procedures.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source