Upload a file through the use of multipart form post.
db_dbfs_put(
path,
file = NULL,
contents = NULL,
overwrite = FALSE,
host = db_host(),
token = db_token(),
perform_request = TRUE
)
The path of the new file. The path should be the absolute DBFS
path (for example /mnt/my-file.txt
).
Path to a file on local system, takes precedent over path
.
String that is base64 encoded.
Flag (Default: FALSE
) that specifies whether to overwrite
existing files.
Databricks workspace URL, defaults to calling db_host()
.
Databricks workspace token, defaults to calling db_token()
.
If TRUE
(default) the request is performed, if
FALSE
the httr2 request is returned without being performed.
Either contents
or file
must be specified. file
takes precedent over
contents
if both are specified.
Mainly used for streaming uploads, but can also be used as a convenient single call for data upload.
The amount of data that can be passed using the contents parameter is limited
to 1 MB if specified as a string (MAX_BLOCK_SIZE_EXCEEDED
is thrown if
exceeded) and 2 GB as a file.
Other DBFS API:
db_dbfs_add_block()
,
db_dbfs_close()
,
db_dbfs_create()
,
db_dbfs_delete()
,
db_dbfs_get_status()
,
db_dbfs_list()
,
db_dbfs_mkdirs()
,
db_dbfs_move()
,
db_dbfs_read()