Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2026 10:05 AM
Hi @maikel ,
- In order to pass dynamic parameters between Python script tasks:
- In the upstream task (named "task_1"), set the dynamic parameter via dbutils:
from databricks.sdk.runtime import * dbutils.jobs.taskValues.set(key = "fave_food", value = "beans") - In the downstream task, set the input parameter from the upstream task, as explained here:
- In the downstream Python task itself, the dynamic parameter is passed as command-line argument:
import argparse p = argparse.ArgumentParser() p.add_argument("-input_dynamic_param") args = p.parse_args() print(args.input_dynamic_param)
- In the upstream task (named "task_1"), set the dynamic parameter via dbutils:
- A typical integration test of the workflow would be:
- Deploy the workflow via Databricks Asset Bundles (to a separate integration/staging workspace, or to a separate target in the DAB definition).
- Run the workflow on a subset of data.
- Output the result into a separate catalog / schema.
- Optionally, add an additional step to the workflow to compare results with the ground truth.
- Ensure that the workflow deployment, input and output data are isolated from other workloads.
- There is no general recommendation on whether to choose Python scripts or Notebooks - it all depends on your team's habits and overall practices:
- Notebooks give richer experience (Markdown, widgets, magic commands).
- Note also that you can save Notebooks as plain python scripts and run them locally (if the code doesn't depend on some rich experience).
- Also, you can run Databricks notebooks directly via your local IDE with Databricks connect.
- Please note that for Lakeflow Spark Declarative Pipelines it's different. Python files are strongly recommended over Notebooks in that case.
Hope it helps.
Best regards,