dbfs_put: Upload a file to DBFS

View source: R/dbfs_put.R

dbfs_putR Documentation

Upload a file to DBFS

Description

Upload a file through the use of multipart form post. It is mainly used for streaming uploads, but can also be used as a convenient single call for data upload.

Usage

dbfs_put(
  local_file,
  destination_path,
  overwrite = "false",
  workspace,
  token = NULL,
  verbose = T,
  ...
)

Arguments

local_file

Path to the file for upload

destination_path

A string representing the destination path in DBFS

overwrite

Boolean ('true', 'false') that specifies whether to overwrite existing files. Defaults to 'false'

workspace

A string representing the web workspace of your Databricks instance. E.g., "https://eastus2.azuredatabricks.net" or "https://demo.cloud.databricks.com".

token

A valid authentication token generated via User Settings in Databricks or via the Databricks REST API 2.0. If none is provided, netrc will be used

verbose

If TRUE, will print the API response to the console. Defaults to FALSE.

...

Additional options to be passed

Details

The API endpoint for putting files on DBFS is '2.0/dbfs/put'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.

Value

The API response

Examples

# No need to include /dbfs/
file <- "my_model.rds"
destination_path <- "/models/my_model.rds"

dbfs_put(file = file, destination_path = destination_path, workspace = workspace)

RafiKurlansik/bricksteR documentation built on Oct. 13, 2022, 6:58 a.m.