問題文
A specialist must add a piece of Python logic that takes one value per row and returns one value per row, and it has to be callable from ordinary SQL written by analysts who do not use Python. Which Snowpark construct fits?
選択肢
- An anonymous function assigned to a variable, which is the form that makes the logic reusable from other sessions later on.
- A user-defined table function, because a named function that SQL can call has to return rows rather than a single value.
- A user-defined function, registered with a name so that SQL can call it like any built-in scalar function.
- A stored procedure, because only a procedure can be registered under a name and granted to a role for use by other users.