我想将数组绑定到过程中的调用。
我收到以下错误消息:
存储过程 TEST_CALL_DO_WITH_ARR 中的执行错误:无效的绑定参数 Gabi、Klaus、Sabine。
错误:绑定参数 2undefined 的类型不受支持在 Snowflake.execute,第 2 行位置 25
CREATE OR REPLACE PROCEDURE Test_DO_WITH_ARR(ARR ARRAY )
RETURNS VARIANT
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS
$$
// Do something with the Array
return 'OK' ;
$$
;
CREATE OR REPLACE PROCEDURE Test_CALL_DO_WITH_ARR()
RETURNS VARIANT
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS
$$
var Param_ARRAY = ['Gabi','Klaus','Sabine'] ;
var stmt = snowflake.execute({ sqlText: "CALL Test_DO_WITH_ARR(:1)", binds: [Param_ARRAY] });
return stmt ;
$$
;
CALL Test_CALL_DO_WITH_ARR() ;