Skip to contents

Returns the contents of a file. If the file does not exist, this call throws an exception with RESOURCE_DOES_NOT_EXIST. If the path is a directory, the read length is negative, or if the offset is negative, this call throws an exception with INVALID_PARAMETER_VALUE. If the read length exceeds 1 MB, this call throws an exception with MAX_READ_SIZE_EXCEEDED.

Usage

read_dbfs(client, path, length = NULL, offset = NULL)

dbfsRead(client, path, length = NULL, offset = NULL)

Arguments

client

Required. Instance of DatabricksClient()

path

Required. The path of the file to read.

length

The number of bytes to read starting from the offset.

offset

The offset to read from in bytes.

Details

If offset + length exceeds the number of bytes in a file, it reads the contents until the end of file.