String object in Javascript UDF does not have the replaceAll() function

When trying to use replaceAll() function from a String object in Snowflake’s Javascipt UDF, it will fail with the below error message: Based on the information on Wikipedia, the string function replaceAll() was released in June 2021, with 12th Edition – ECMAScript 2021.  Since this is a new function, it has not been incorporated into Snowflake’s Javascript library. […]

Loading

Continue Reading

Stored Procedure fails with error “Requested information on the current user is not accessible in stored procedure”

When running a Stored Procedure that triggers a query to run against Views or Functions from INFORMATION_SCHEMA, it might fail with below error message: Requested information on the current user is not accessible in stored procedure. This can be easily reproduced using below code: The reason for the failure is because for the owner’s right […]

Loading

Continue Reading

Stored Procedure with Date parameter failed with error: “Unsupported type for binding argument 2”

It is common that we will need to perform Date transformations inside Stored Procedures in SQL. Recently I have encountered an error that Snowflake does not like the format that is generated by Javascript inside Stored Procedure code, and resulted an error. See below example: To execute this Stored Procedure, simply run below query: And […]

Loading

Continue Reading