Experts,
I am trying to use tables function inside the snowflake procedure. However it throws me an error.
CREATE PROCEDURE
.....
....
extcnt ="select count(*) from table(information_schema.external_table_files(table_name=>''MYTABLE''))";
snowflake.execute({sqlText: extcnt});
.....
I get below error message. Is there any restriction in using table function inside the procedure? Please Help.
"JavaScript execution error: Uncaught 100183-Stored procedure execution error: Requested information on the current user is not accessible in stored procedure"
Regards, Gopi
Check the "Caller’s Rights and Owner’s Rights Stored Procedures" - this is probably the source of that error message:
When defining a stored procedure you can ask it to
EXECUTE AS CALLER
, which changes the access it has to different resources.