You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用Snowpark Python存储过程时出现SnowparkSQLException: User is empty in function错误的解决求助

调用Snowpark Python存储过程时出现SnowparkSQLException: User is empty in function错误的解决求助

各位好,我最近在使用Snowpark Python注册并调用存储过程时碰到了一个特别棘手的问题,翻遍了各种资料都没找到相关的异常说明,实在没办法来求助了!

当我调用注册好的存储过程时,直接抛出了这个错误:

SnowparkSQLException: (1304): <uuid>: 100357 (P0000): <uuid>: Python Interpreter Error:
snowflake.connector.errors.ProgrammingError: 251005: User is empty in function MY_FUNCTION with handler compute

我的代码和调用逻辑如下:

def my_function(session: Session,
                input_table: str,
                limit: int) -> None:
    # 哪怕什么逻辑都不写,依然会触发这个错误!
    return

sproc_my_function = my_session.sproc.register(func=my_function,
                                           name='my_function',
                                           is_permanent=True,
                                           replace=True,
                                           stage_location='@STAGE_LOC',
                                           execute_as="owner")


input_table = 'x.y.MY_INPUT_TABLE'

sproc_process_row(my_session,
                  input_table,
                  100)

我完全搜不到“User is empty in function”这个异常的相关参考,甚至怀疑是不是某个底层错误的穿透提示?另外我也没找到在register方法里额外传递用户信息的入口——毕竟my_session已经是配置好有效用户的会话了。

有没有大佬遇到过类似的问题?求指点迷津!

备注:内容来源于stack exchange,提问作者jtlz2

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 12:44:34