r/databricks • • 11h ago

Help How do you read Pipeline Parameters in Python

Pipeline Parameters are now GA since a few weeks and should replace pipeline configurations for run-specific parameters.

In python, you can read paramters using spark.config.get("key")

However, the official docu doesn't say how to get paramters in python.

With jobs it is dbutils.widgets.get("env") within pipelines this doesn't work. Any idea?

For me it interesting that jobs and pipelines don't share the same interface...

1 Upvotes

3 comments sorted by

1

u/DeepFryEverything 9h ago

It literally says "Pipeline parameters are available to SQL source code only".

1

u/testing_in_prod_only 7h ago

For pipelines they are spark configurations, so spark.conf.get(“env”)

I also remember something about being able to set environment variables on serverless compute now in dabs.

1

u/dvartanian 6h ago

Yeah I raised this a while back as only available in SQL for now. Hopefully not much longer but a timescale would be nice