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_streamfrom stored procedures was called using astage_prefixand aninput_stream. The stored procedure inferred the file name frominput_streamusinginput_stream.nameand uploading it to thestage_prefix.put_streamwould break in the case whereinput_streamdid not have thenameattribute. This behavior differed fromput_streamon 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_streamdoes not have anameattribute 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