An array with the values or the variables to bind into the SQL statement.
NoCatch (optional)
Boolean to know if an error should not be catched.
catchFunction (optional)
A function to execute in case an error occurs during the execution of the exec function.
opts (optional)
A JSON object ({ temp : true }) to know if the query ID should be returned.
FixBind And FormatDate Functions
The Exec helper uses a function defined in the helpers called FixBind. This function uses the FormatDate function when it encounters that one of the binding variables is a date type, this is done to manage properly the date types in Snowflake.
Both functions are defined as below.
CREATEORREPLACEPROCEDUREProcedureSample ()RETURNSSTRINGLANGUAGEJAVASCRIPTCOMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
EXECUTEASCALLERAS$$// SnowConvert Helpers Code section is omitted.switch(value) {case0:EXEC(`SELECT * from table1`,[]);break;default:EXEC(`UPDATE table1 set name = "SpecificValue" where id = value`,[]);break; }$$;