<@ULVA73B9P> can you provide an example how to han...
# ask-marvin
c
@Marvin can you provide an example how to hand over a boolean value as job variable
m
To pass a boolean value as a job variable in Prefect, you can use the
job_variables
argument when deploying a flow. Here's a concise example of how you might do this in Python:
Copy code
python
from prefect import flow
from prefect.deployments import Deployment

@flow
def my_flow():
    # Your flow logic here
    pass

# Define job variables
job_vars = {
    "my_boolean_variable": True
}

# Create a deployment with job variables
deployment = Deployment.build_from_flow(
    flow=my_flow,
    name="my_deployment",
    job_variables=job_vars
)

# Deploy the flow
deployment.apply()
### Key Points: - Job Variables: You can pass job variables as a dictionary to the
job_variables
parameter in the
.deploy()
method or when building a deployment. - Visibility: These variables will be visible in the Prefect UI under the Configuration tab. - Override: Job variables can override any values set on the work pool or deployment during a flow run. ### Further Reading: - Prefect Variables Documentation - Deployment Customization This should help you integrate boolean job variables into your Prefect workflows.