snowflake.snowpark.files.SnowflakeFile.open_new_result

classmethod SnowflakeFile.open_new_result(mode: str = 'w') SnowflakeFile[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.30.0/snowpark-python/src/snowflake/snowpark/files.py#L95-L105)

Used to create a SnowflakeFile which can only be used for write-based IO operations. UDFs/Stored Procedures should return the file to materialize it, and it is then made accessible via a scoped URL returned in the query results.

In UDFs and Stored Procedures, the object works like a write-only Python IOBase object and as a wrapper for an IO stream of remote files.

Parameters:

mode – A string used to mark the type of an IO stream. Supported modes are “w” for text write and “wb” for binary write.

Language: English