Closed AndreiTapai closed 7 months ago
In order to return TABLE(), please use an alternative syntax, which is similar to table columns:
returns:
col1: NUMBER(38,0)
col2: VARCHAR(255)
It is documented, but probably not very clear. Hmm.. maybe I should add an explicit warning to output about this.
Ah, it is about TABLE()
without names and types. Seems like a new feature.
Initially you may try this syntax:
returns: {}
If it does not work, I'll update the code to take this use case into account.
That seems to work. Though it is not very intuitive. Not sure how it could be expressed better. Maybe just documenting it is enough.
I'll add test and note in documentation with the next update.
Thank you for pointing this out.
Updated documentation for PROCEDURE object type.
Describe the bug When declaring a procedure I would like to be able to set the return type to
TABLE()
since I do not know the return schema before the procedure executes. Currently I get an error.Expected behavior Compiles appropriately.
See Snowflake docs: https://docs.snowflake.com/en/developer-guide/stored-procedure/stored-procedures-snowflake-scripting
Attach log
ValueError: Could not parse data type string [TABLE()]
Attach YAML config (if applicable)
Any help would be appreciated!