Skip to content

Databricks commands

The commands of the pipeloom-databricks plugin. See the plugin page for how they fit together. pipeloom finalize, which the job's finalize task calls, is listed in the core command line.

pipeloom databricks

Databricks jobs for a pipeloom project.

Usage:

pipeloom databricks [OPTIONS] COMMAND [ARGS]...

Options:

  --profile NAME  The Databricks profile to use. Without it,
                  DATABRICKS_CONFIG_PROFILE, then DATABRICKS_HOST, then the
                  runtime; pipeloom never picks a profile by itself.
  --help          Show this message and exit.

pipeloom databricks bundle

Write one job file and one manifest per pipeline into a bundle.

The job is /pipeloom_.job.yml and refers to the project and the manifest through ${workspace.file_path}. Exit codes: 0 ok, 1 a diagnostic or a changed file with --check, 2 bad usage.

Usage:

pipeloom databricks bundle [OPTIONS]

Options:

  --project-dir DIRECTORY   Directory that holds pipeloom.yml.  [default: .]
  --vars TEXT               Variables as a YAML or JSON mapping; they override
                            the vars block.
  --target TEXT             Target to bind; default_target or the only target
                            when omitted.
  --plugin MODULE:ATTR      A PluginSpec to load besides the installed
                            plugins. Repeatable.
  --log-format [text|json]  Diagnostics and events on stderr: readable text or
                            one JSON object per line.  [default: text]
  --out DIRECTORY           Folder for the generated files; it must lie inside
                            the bundle.  [required]
  --pipeline NAME           A pipeline of the deploy block. Repeatable.
                            Default: all of them.
  --bundle-root DIRECTORY   The bundle's root folder. Default: the nearest
                            folder above --out with databricks.yml.
  --check                   Write nothing; exit 1 and list the files that
                            differ from what would be written.
  --help                    Show this message and exit.

pipeloom databricks deploy

Upload the project to the workspace and create or update one job per pipeline.

Prints one JSON line per pipeline: {pipeline, job_id, action, root}. With --dry-run it prints {pipeline, root, settings} instead and creates no client. Exit codes: 0 ok, 1 a diagnostic.

Usage:

pipeloom databricks deploy [OPTIONS]

Options:

  --project-dir DIRECTORY   Directory that holds pipeloom.yml.  [default: .]
  --vars TEXT               Variables as a YAML or JSON mapping; they override
                            the vars block.
  --target TEXT             Target to bind; default_target or the only target
                            when omitted.
  --plugin MODULE:ATTR      A PluginSpec to load besides the installed
                            plugins. Repeatable.
  --log-format [text|json]  Diagnostics and events on stderr: readable text or
                            one JSON object per line.  [default: text]
  --pipeline NAME           A pipeline of the deploy block. Repeatable.
                            Default: all of them.
  --dry-run                 Print the job settings as JSON and connect to
                            nothing.
  --help                    Show this message and exit.

pipeloom databricks repair

Rerun the failed, cancelled and skipped tasks of a finished run, and finalize again.

Name the run with --run-id (the pipeloom run id) or --job-run-id (the Databricks run id), exactly one. Prints {job_run_id, repair_id} as one JSON line. Exit codes: 0 ok (also when there is nothing to repair), 1 a diagnostic or a repair that did not succeed, 2 bad usage.

Usage:

pipeloom databricks repair [OPTIONS]

Options:

  --project-dir DIRECTORY   Directory that holds pipeloom.yml.  [default: .]
  --vars TEXT               Variables as a YAML or JSON mapping; they override
                            the vars block.
  --target TEXT             Target to bind; default_target or the only target
                            when omitted.
  --plugin MODULE:ATTR      A PluginSpec to load besides the installed
                            plugins. Repeatable.
  --log-format [text|json]  Diagnostics and events on stderr: readable text or
                            one JSON object per line.  [default: text]
  --pipeline NAME           A pipeline of the deploy block. Default: the only
                            one.
  --run-id RID              The run to repair.
  --job-run-id N            The job run to repair.  [x>=1]
  --wait / --no-wait        Wait for the run to end (polling every 15 seconds)
                            and exit 1 unless it succeeded.  [default: wait]
  --timeout SECONDS         With --wait, stop waiting after this long and exit
                            1. The run keeps going.  [default: 86400; x>=1]
  --help                    Show this message and exit.

pipeloom databricks run

Run the deployed job of a pipeline, or run it once without a job (--ephemeral).

Prints {job_id, job_run_id, run_id, run_page_url} as one JSON line. --select and --exclude pick units: only their tasks (and finalize) run. Exit codes: 0 ok, 1 a diagnostic or a run that did not succeed, 2 bad usage.

Usage:

pipeloom databricks run [OPTIONS]

Options:

  --project-dir DIRECTORY   Directory that holds pipeloom.yml.  [default: .]
  --vars TEXT               Variables as a YAML or JSON mapping; they override
                            the vars block.
  --target TEXT             Target to bind; default_target or the only target
                            when omitted.
  --plugin MODULE:ATTR      A PluginSpec to load besides the installed
                            plugins. Repeatable.
  --log-format [text|json]  Diagnostics and events on stderr: readable text or
                            one JSON object per line.  [default: text]
  -s, --select SELECTOR     Models to include: name, tag:x, path:dir,
                            materialized:x, +model, model+, N+model, model+N.
                            Space unions, comma intersects. Repeatable, all
                            are unioned.
  --exclude SELECTOR        Remove the models this selector matches from the
                            selection. Repeatable.
  --pipeline NAME           A pipeline of the deploy block. Default: the only
                            one.
  --run-id RID              Name the run (1 to 64 letters, digits, dots,
                            underscores or hyphens) and make the start
                            idempotent. Default: dbx-<job run id>.
  --full-refresh            Rebuild append tables from scratch.
  --ensure                  Deploy the job first when it is missing or out of
                            date, instead of stopping.
  --ephemeral               Run once without a job: upload the project and
                            submit the run. Serverless only.
  --wait / --no-wait        Wait for the run to end (polling every 15 seconds)
                            and exit 1 unless it succeeded.  [default: wait]
  --timeout SECONDS         With --wait, stop waiting after this long and exit
                            1. The run keeps going.  [default: 86400; x>=1]
  --help                    Show this message and exit.