Skip to main content

Before Script in DataOps.live Develop

A custom before_ script is a command or script that runs before the main script block of each job in your DataOps pipeline. For example, In the DataOps development environment, you can create and use custom before scripts to set various dynamic variables, such as DATAOPS_DATABASE, and branch/environment names variables. These values become accessible to the development environment and scripts running in the job's central part.

To use custom before scripts when working with the DataOps development environment:

  1. Create the script.

  2. Enable the script for your project, either in a single project or a reference project, depending on your configuration.

  3. Set the environment variable DATAOPS_EXTRA_BEFORE_SCRIPTS for your development workspace by navigating to Gitpod → User Settings → Variables (https://gitpod.io/user/variables). This variable should point to your additional before_ script.

    Ensure the variable value follows the format /workspace/<your project name>/<path to the before script file>. For example:

    using before script in the development environment !!shadow!!