Stored Procedures: put_stream Uses Different Way to Get the File Name¶
Attention
This behavior change is in the 2023_02 bundle.
For the current status of the bundle, refer to Bundle History.
The way you use put_stream
inside stored procedures to upload files to a stage has changed and now aligns with the put_stream
protocol to Snowpark Python client.
- Previously:
Uploading files using
put_stream
from stored procedures was called using astage_prefix
and aninput_stream
. The stored procedure infered the file name frominput_stream
usinginput_stream.name
and uploading it to thestage_prefix.put_stream
would break in the case whereinput_stream
did not have thename
attribute. This behavior differed fromput_stream
on the Snowpark Python client.- Currently:
Uploading files using put_stream from stored procedures is called using a
stage_location
=stage_prefix
+/
+file_name
, and aninput_stream
. The stored procedure infers the file name usingstage_location
. This would work in the case whereinput_stream
does not have aname
attribute and the behavior also aligns with the Snowpark Python client.
Note
Customers using put_stream
without a full stage location should update their code to upload files using a full stage location with
stage prefix and target file name.
Ref: 943