Skip to content

Latest commit

 

History

History
94 lines (80 loc) · 2.08 KB

dbk_fs.md

File metadata and controls

94 lines (80 loc) · 2.08 KB

dbk_fs

dbk_fs(name, configure, files, stamp)

For example, if the BUILD file contains:

dbk_fs(
  name = "src"
  configure = ":cfg",
  files = [":src.jar"],
  stamp = "{BUILD_TIMESTAMP}",
)
Attributes
name Name, required

A unique name for this rule.

configure Label, required

Label of dbk_configure target.

Specify the databricks cluster settings.

configure = ":cfg"

files Label List of files, required

File to add to the Databricks File Store (DBFS).

The file path in DBFS follows the pattern: dbfs:/FileStore/bazel/{target}

stamp String, optional, default is empty string

The name of the databricks cluster where operations can be performed.

The values of this field support stamp variables.

cluster_name = "{BUILD_TIMESTAMP}"

Usage

The dbk_fs rules expose a collection of actions. We will follow the :src target from the example above.

List

Users can list properties of files in DBFS by running:

bazel run :src

Copy

Users can copy files to DBFS by running:

bazel run :src.cp

Remove

Users can remove files from the DBFS by running:

bazel run :src.rm

It is notable that, despite deleting a file, it can be used in the cluster. Therefore, make sure it is not in use before performing this action.