简体   繁体   English

将 javascript 库包含到 Snowflake UDF 中

[英]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.我有兴趣让 JS UDF 工作而不在 function 的开头粘贴一堆代码。

Anyone knows if there is any similar way to include javascript libraries in UDFs as BigQuery does?任何人都知道是否有任何类似的方法可以像 BigQuery 那样在 UDF 中包含 javascript 库?

https://cloud.google.com/bigquery/docs/reference/standard-sql/user-defined-functions#including-javascript-libraries https://cloud.google.com/bigquery/docs/reference/standard-sql/user-defined-functions#include-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.我很想知道它是否至少在 Snowflake 的路线图中,或者是否有另一种方法来处理这种情况。

Restrictions on Stored Procedures : 存储过程的限制

Stored procedures have the following restrictions:存储过程有以下限制:

  • The JavaScript code cannot call the JavaScript eval() function. JavaScript 代码不能调用 JavaScript eval() function。

  • JavaScript stored procedures support access to the standard JavaScript library. JavaScript 存储过程支持访问标准 JavaScript 库。 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.允许第三方库可能会造成安全漏洞。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM