Medium severityexecution
Power BI Refresh Error:
002139 (42883)
What does this error mean?
Snowflake cannot resolve the function name — either the function does not exist in the current database/schema, the argument types do not match any registered signature, or the executing role lacks USAGE privilege on the function.
Common causes
- 1Calling a UDF or stored procedure that was created in a different schema without a fully-qualified name
- 2Argument types do not match the function signature (e.g., passing VARCHAR where NUMBER is expected)
- 3Using a built-in function name that is valid in another database (PostgreSQL, MySQL) but not in Snowflake
- 4The executing role lacks USAGE privilege on the UDF
- 5The function was dropped or belongs to a different Snowflake account
How to fix it
- 1Use a fully-qualified function name: database.schema.function_name(args)
- 2Run SHOW USER FUNCTIONS IN SCHEMA mydb.myschema to verify the function exists and its signature
- 3Check argument types — Snowflake overloads functions by type; cast arguments explicitly if needed
- 4Grant USAGE on the function to the executing role: GRANT USAGE ON FUNCTION mydb.myschema.my_func(NUMBER) TO ROLE my_role
- 5For built-in function name mismatches, consult Snowflake's SQL function reference for the correct equivalent