Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including javascript libraries into Snowflake UDFs

I'm interested in getting JS UDFs to work without pasting a bunch of code at the beginning of the function.

Anyone knows if there is any similar way to include javascript libraries in UDFs as BigQuery does?

https://cloud.google.com/bigquery/docs/reference/standard-sql/user-defined-functions#including-javascript-libraries

I would love to know if it's at least in Snowflake's roadmap or if there is another method to handle this kind of cases.

like image 300
Valentín de la Cruz Barquero Avatar asked Feb 02 '26 02:02

Valentín de la Cruz Barquero


1 Answers

Restrictions on Stored Procedures:

Stored procedures have the following restrictions:

  • The JavaScript code cannot call the JavaScript eval() function.

  • JavaScript stored procedures support access to the standard JavaScript library. Note that this excludes many objects and methods typically provided by browsers. There is no mechanism to import, include, or call additional libraries. Allowing 3rd-party libraries could create security holes.

like image 86
Lukasz Szozda Avatar answered Feb 03 '26 14:02

Lukasz Szozda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!