Stored Procedures: put_stream Uses Different Way to Get the File Name¶
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
protocol to Snowpark Python client.
Uploading files using
put_streamfrom stored procedures was called using a
input_stream. The stored procedure infered the file name from
input_stream.nameand uploading it to the
stage_prefix.put_streamwould break in the case where
input_streamdid not have the
nameattribute. This behavior differed from
put_streamon the Snowpark Python client.
Uploading files using put_stream from stored procedures is called using a
file_name, and an
input_stream. The stored procedure infers the file name using
stage_location. This would work in the case where
input_streamdoes not have a
nameattribute and the behavior also aligns with the Snowpark Python client.
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.