dbfs_mkdirs: Create a path on DBFS

View source: R/dbfs_mkdirs.R

dbfs_mkdirsR Documentation

Create a path on DBFS

Description

Create the given directory and necessary parent directories if they do not exist. If there exists a file (not a directory) at any prefix of the input path, this call throws an exception with RESOURCE_ALREADY_EXISTS. If this operation fails it may have succeeded in creating some of the necessary parent directories.

Usage

dbfs_mkdirs(path, workspace, token = NULL, verbose = T, ...)

Arguments

path

A string representing the path to create in DBFS

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 creating a path on DBFS is '2.0/dbfs/mkdirs'. 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/
path <- "/rk/data/new_dir"

dbfs_mkdirs(path = path, workspace = workspace)

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