为 GCP 调用外部函数¶
本主题介绍如何调用外部函数:
-
If appropriate, grant USAGE privilege on the external function to one or more Snowflake roles so that the roles can call the external function. A role must have USAGE or OWNERSHIP privileges on that external function.
-
像执行任何 UDF 一样调用外部函数。例如,如果创建 Snowflake 提供的示例函数:
If you customized the function name when you created the function, then replace
my_external_functionwith the customized name.
返回值应类似于:
Note
外部函数是架构对象,因此包含该函数的架构必须在会话中使用,或者必须在调用函数时指定函数的完全限定名称。