You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are investigating usage of Snow CLI 2.1.0 in our project in which we have UDTF defined.
Right now returns property of Snowflake Function definition has str type. So we have to use a workaround defining returns: "table (id int, name string)".
I think it may be useful to allow name-type list to be specified the same way as for signature property:
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Allow Snowpark Function to define returns as name-type list
SNOW-1230490: Allow Snowpark Function to define returns as name-type list
Mar 12, 2024
Thanks for the proposal @kokorin! Happy to brainstorm on that one. Will simply changing the returns to list be enough? I have a feeling we would need to consider something like
@sfc-gh-turbaszek to be honest return_type is confusing especially in second case. May be it could be better to have another top-level list in snowflake.yml:
definition_version: 1snowpark:
functions:
- name: my_udf# other propsreturns: stringtable_functions:
- name: my_udtf# other propsreturns:
- name: idtype: int
- name: nametype: stringprocedures: [ ... ]
In that case it will be possible to validate signature.
Apart from that it can be useful to have more strict differentiation between UDF and UDTF:
definition_version: 1snowpark:
functions:
- name: my_udf# other propsreturns: string
- name: my_udtf# other propsreturns_columns:
- name: idtype: int
- name: nametype: stringprocedures: [ ... ]
Description
We are investigating usage of Snow CLI 2.1.0 in our project in which we have UDTF defined.
Right now
returns
property of Snowflake Function definition hasstr
type. So we have to use a workaround definingreturns: "table (id int, name string)"
.I think it may be useful to allow name-type list to be specified the same way as for
signature
property:Context
No response
The text was updated successfully, but these errors were encountered: