Skip to main content
Run one or more Python scripts in a Bolt schedule for custom data processing, transformation, API calls, or validation that built-in commands do not cover.

Prerequisites

  • The Python script committed to your project.

Manage dependencies with Poetry

We recommend managing your Python dependencies with Poetry.
  • Keep your Poetry project (pyproject.toml and poetry.lock) at the root of your dbt™ project, alongside dbt_project.yml. Paradime resolves the environment from there.
  • Make poetry install the first command in the schedule, so the virtual environment is built before your script runs. Poetry then runs your script inside that environment.
Store secrets (API keys, credentials) as Bolt schedule environment variables and read them with os.environ rather than hardcoding them.

Usage

Add the Run Python Script command to your schedule and enter one or more commands, one per line. If you use Poetry, start with poetry install:
Without Poetry, run the script directly:

Learn more

See Using Poetry for dependency management, and Bolt schedule environment variables for handling secrets.