You are viewing documentation about an older version (1.34.0). View latest version

FilesΒΆ

SnowflakeFile for UDFs and stored procedures in Snowpark.

This class is intended for usage within stored procedures and UDFs and many methods do not work locally.

Classes

SnowflakeFile(file_location[, mode, ...])

SnowflakeFile provides an interface to operate on files as Python IOBase-like objects in UDFs and stored procedures.

Methods

close()

In UDF and Stored Procedures, the close func closes the IO Stream included in the SnowflakeFile.

fileno()

See https://docs.python.org/3/library/io.html#io.IOBase.fileno

isatty()

Returns False, file streams in stored procedures and UDFs are never interactive in Snowflake.

open(file_location[, mode, is_owner_file, ...])

Used to create a SnowflakeFile which can only be used for read-based IO operations on the file.

open_new_result([mode])

Used to create a SnowflakeFile which can only be used for write-based IO operations.

read([size])

See https://docs.python.org/3/library/io.html#io.RawIOBase.read

read1([size])

See https://docs.python.org/3/library/io.html#io.BufferedIOBase.read1

readable()

See https://docs.python.org/3/library/io.html#io.IOBase.readable

readall()

See https://docs.python.org/3/library/io.html#io.RawIOBase.readall

readinto(b)

See https://docs.python.org/3/library/io.html#io.IOBase.readinto

readinto1(b)

See https://docs.python.org/3/library/io.html#io.BufferedIOBase.readinto1

readline([size])

See https://docs.python.org/3/library/io.html#io.IOBase.readline

readlines([hint])

See https://docs.python.org/3/library/io.html#io.IOBase.readlines

seek(offset[, whence])

See https://docs.python.org/3/library/io.html#io.IOBase.seek

seekable()

See https://docs.python.org/3/library/io.html#io.IOBase.seekable

tell()

See https://docs.python.org/3/library/io.html#io.IOBase.tell

write(b)

See https://docs.python.org/3/library/io.html#io.RawIOBase.write

writable()

See https://docs.python.org/3/library/io.html#io.IOBase.writable

writelines(lines)

See https://docs.python.org/3/library/io.html#io.IOBase.writelines

Attributes

None