Skip to main content
Available for Enterprise Edition only.
The Prophecy Build Tool (PBT) is a command-line utility for building, testing, validating, and deploying Prophecy-generated projects. The Prophecy Build Tool lets you integrate Prophecy pipelines into existing CI/CD systems (such as GitHub Actions or Jenkins) and orchestration platforms (such as Databricks Workflows). You can use the PBT to run the same set of tasks described in Project release and deployment from the command line or in a CI/CD script.
The Prophecy Build Tool only supports building Python and Scala projects.

Features

Using the Prophecy Build tool, you can:
  • Build pipelines (all or a subset) in Prophecy projects.
  • Unit test pipelines in Prophecy projects.
  • Deploy jobs with built pipelines on Databricks.
  • Deploy jobs filtered by fabric IDs on Databricks.
  • Integrate with CI/CD tools like GitHub Actions.
  • Verify the project structure of Prophecy projects.
  • Deploy pipeline configurations.
  • Add Git tags to a deployment.
  • Set versions for PySpark projects.

Requirements

To install and run the Prophecy Build Tool, you need:
  • pip
  • python >=3.7 (Recommended 3.9.13)
  • pyspark (Recommended 3.3.0)

Using generated wheel artifacts

The Prophecy Build Tool (PBT) generates Python wheel (.whl) files as part of the build process. These artifacts must be available in the execution environment where your pipeline runs. Depending on your setup, you may need to install or provide the wheel manually.

Local or ad-hoc execution

If you are running jobs locally or outside a managed deployment pipeline, install the wheel file before execution:
Alternatively, when using Spark:

Databricks or cluster environments

Ensure the wheel is either:
  • attached as a cluster library, or
  • included in your deployment process.

Install PBT

To install the Prophecy Build Tool, run:
See the PyPI package for the latest version.

Usage

Configuration

Before using PBT with Databricks, set the following environment variables:
These variables define the Databricks workspace and credentials used for building and deploying.

Build pipelines

The build command compiles all or specific pipelines within a Prophecy project.
You can also use a v2 version of the command, which adds an --add-pom-python option.

Build options

To build only specific pipelines:
To continue despite build or parsing errors:
If any pipeline fails to build, the Build tool exits with code 1 unless error-skipping flags are used.

Deploy pipelines and jobs

The deploy command builds and deploys Prophecy pipelines and jobs to your Databricks workspace.
PBT supports the --release-version and --project-id parameters, used to replace placeholders in your job definition file (databricks-job.json). These values determine the DBFS path where artifacts are uploaded.
Use the project’s ID (from its URL) and a unique release version for each deployment.

Sample deploy output

Deploy dependent projects

Use --dependent-projects-path to include dependent Prophecy projects located in subdirectories.

Deploy by fabric ID

Use --fabric-ids to deploy jobs associated with specific Fabric IDs (helpful for multi-workspace environments).
You can find Fabric IDs in the Prophecy UI by visiting the Metadata page of a Fabric and checking its URL.

Skip builds

To deploy previously built pipelines without rebuilding:

Deploy specific jobs

By default, all jobs are deployed. To deploy selected jobs, use --job-ids.
The Prophecy Build Tool automatically identifies and builds only the pipelines required by those jobs. You can also use a v2 version of the command, which adds several options described in the table below.

Deploy options summary

Test pipelines

The Prophecy Build Tool supports unit testing of pipelines within a Prophecy project. Tests run with the default configuration under configs/resources/config.

Test options

If --driver-library-path is omitted, dependencies are fetched automatically from Maven Central.

Sample test output

Validate pipelines

Validation checks all pipelines in a project for warnings and errors, similar to Prophecy’s in-IDE diagnostics. This helps ensure pipelines are production-ready before deployment.

Validate options

Applying versions to PySpark projects

PySpark projects often rely on specific versions of Spark, Python libraries, and data connectors. Versioning the project (via pbt_project.yml or setup.py) ensures compatibility between your code and these dependencies, helping avoid runtime errors when pipelines are deployed to different environments (local, Databricks). The Prophecy Build Tool lets you set various options for versioning as follows.

Versioning options

Tagging builds

The pbt tag command creates a Git tag for the version listed in pbt_project.yml. This tag marks a specific point in your project’s history so you can track or redeploy that version later. By default, the tag name includes the branch (for example, main/1.4.0) and is pushed to the remote automatically. You can change or remove the branch name with --branch, create a custom tag with --custom, or skip pushing with --no-push.

Tag options

Sample output

Quick reference

Example workflow

What’s next

To learn how to integrate the Prophecy Build Tool with GitHub Actions and Jenkins, see the following examples: