Import a notebook or the contents of an entire directory.
Arguments
- path
Absolute path of the notebook or directory.
- file
Path of local file to upload. See
formats
parameter.- content
Content to upload, this will be base64-encoded and has a limit of 10MB.
- format
One of
AUTO
,SOURCE
,HTML
,JUPYTER
,DBC
,R_MARKDOWN
. Default isSOURCE
.- language
One of
R
,PYTHON
,SCALA
,SQL
. Required whenformat
isSOURCE
otherwise ignored.- overwrite
Flag that specifies whether to overwrite existing object.
FALSE
by default. ForDBC
overwrite is not supported since it may contain a directory.- host
Databricks workspace URL, defaults to calling
db_host()
.- token
Databricks workspace token, defaults to calling
db_token()
.- perform_request
If
TRUE
(default) the request is performed, ifFALSE
the httr2 request is returned without being performed.
Details
file
and content
are mutually exclusive. If both are specified content
will be ignored.
If path already exists and overwrite
is set to FALSE
, this call returns
an error RESOURCE_ALREADY_EXISTS.
You can use only DBC
format to import
a directory.
See also
Other Workspace API:
db_workspace_delete()
,
db_workspace_export()
,
db_workspace_get_status()
,
db_workspace_list()
,
db_workspace_mkdirs()