---
title: Use parameters with pipelines
description: Parameterize Lakeflow pipeline code so a single pipeline can run against different catalogs, schemas, or tables without editing the source.
canonical_url: https://docs.databricks.com/aws/en/ldp/parameters
---

# Use parameters with pipelines

Pipeline parameters let you reuse the same pipeline source code across environments or datasets. For example, you can run the same transformations against `dev` and `prod` catalogs, or ingest from a different source path on each run. You define parameters on the pipeline (or override them when starting an update) and reference them from your SQL source code.

Pipeline parameters are available to SQL source code only. To parameterize Python source code in a pipeline, use the **Configuration** field as described in [Reference parameters using the configuration field](https://docs.databricks.com/aws/en/ldp/parameters.md#configuration-field). Configuration is also used to set Spark configuration values that pipelines read at runtime. For details on the Spark configuration settings, see [Pipeline properties reference](https://docs.databricks.com/aws/en/ldp/properties.md).

## What are pipeline parameters?

Pipeline parameters are key-value pairs that you can:

* Declare as defaults in pipeline settings.
* Override when starting an update from the pipeline UI, the [Start update API](https://docs.databricks.com/api/workspace/pipelines/startupdate), or the **Run with different settings** dialog.
* Override on the pipeline task in a job, with optional pushdown of [job-level parameters](https://docs.databricks.com/aws/en/jobs/job-parameters.md).
* Reference from SQL source code using the [named parameter](https://docs.databricks.com/aws/en/sql/user/queries/query-parameters.md) syntax.

Parameter values are always strings. Keys can contain alphanumeric characters, underscores (`_`), hyphens (`-`), and periods (`.`).

Pipeline parameters and the **Configuration** field serve different purposes:

| Use **Parameters** for...                                                     | Use **Configuration** for...                                                                                          |
| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Values that change between updates (target catalog, source path, date range). | Spark configuration that controls pipeline behavior (`pipelines.enzyme.enabled`, `pipelines.clusterLabelsV2Enabled`). |
| Values you want pushed down from a job or task.                               | Static, structural pipeline properties.                                                                               |
| Values you reference in SQL with named parameter syntax.                      | Values you reference with `${key}` syntax in SQL or `spark.conf.get("key")` in Python.                                |

## Define pipeline parameters

You can define default parameter values in pipeline settings. When an update runs without overrides, the pipeline uses these defaults.

### Use the pipeline UI

1. In your workspace, click ![Workflows icon.](https://docs.databricks.com/aws/en/images/product-icons/WorkflowsIcon.svg) **Jobs & Pipelines** in the sidebar and select your pipeline.
2. Click **Settings**.
3. In the **Pipeline settings** sidebar, find the **Parameters** section and click **Edit**.
4. Add **Key** and **Value** entries, then click **Save**.

### Use the JSON or REST API

Add a `parameters` map to the pipeline's JSON definition, either in pipeline settings or when using the REST API:

```json
{
  "name": "Sales pipeline",
  "parameters": {
    "source_catalog": "dev_catalog",
    "source_schema": "sales",
    "start_date": "2026-01-01"
  }
}
```

For the full pipeline JSON reference, see [Pipeline configurations](https://docs.databricks.com/aws/en/ldp/properties.md#config-settings).

### Use YAML or Declarative Automation Bundles

Define parameters in the `parameters` mapping of the pipeline's YAML definition, either in pipeline settings or in a Declarative Automation Bundles ([What are Declarative Automation Bundles?](https://docs.databricks.com/aws/en/dev-tools/bundles/index.md)):

```yaml
resources:
  pipelines:
    my_pipeline:
      name: Sales pipeline
      parameters:
        source_catalog: dev_catalog
        source_schema: sales
        start_date: '2026-01-01'
```

## Reference parameters in SQL source code

Reference a parameter by prefixing the key with a colon. Databricks binds the value as a string at update time:

```sql
CREATE OR REFRESH MATERIALIZED VIEW transaction_summary AS
SELECT account_id,
  COUNT(txn_id) AS txn_count,
  SUM(txn_amount) AS account_revenue
FROM :source_catalog.sales.transactions
WHERE txn_date >= :start_date
GROUP BY account_id
```

To use a parameter in an identifier position, such as a catalog, schema, or table name, wrap it in `IDENTIFIER()`:

```sql
USE CATALOG IDENTIFIER(:source_catalog);
USE SCHEMA IDENTIFIER(:source_schema);

CREATE OR REFRESH MATERIALIZED VIEW daily_sales AS
SELECT date(timestamp) AS date,
  SUM(price) AS total_sales
FROM transactions
GROUP BY date;
```

If your source code references a parameter that has no value at update time, the update fails with an error. The pipeline ignores extra parameters that the code doesn't reference.

## Override parameters at update time

You can override parameter values for a single update without changing the saved defaults.

* From the pipeline UI, click **Run with different settings** and edit the **Parameters** section.
* From a pipeline task in a job, set parameter overrides in the task's **Parameters** field. See [Parameters](https://docs.databricks.com/aws/en/jobs/tasks/pipeline.md#parameters).
* From the API, pass a `parameters` map in the [Start update](https://docs.databricks.com/api/workspace/pipelines/startupdate) request.

Databricks records the parameters for a specific update in the update history and displays them in the **Run parameters** column of the pipeline runs list.

## <a id="precedence" />Parameter precedence

When you define the same key in more than one place, the value with the highest precedence wins. From highest to lowest:

1. **Job run parameters**: values supplied for a single job run (overrides).
2. **Job parameters**: defaults defined on the parent job.
3. **Pipeline task parameters**: values set on the pipeline task.
4. **Pipeline parameters**: defaults defined in pipeline settings.

This matches the precedence used by other [job parameter task types](https://docs.databricks.com/aws/en/jobs/job-parameters.md#pushdown).

## Pipeline parameters in Lakeflow Jobs

When you schedule a pipeline as a [pipeline task](https://docs.databricks.com/aws/en/jobs/tasks/pipeline.md) in a job, the task can supply parameters that override the pipeline's defaults. Parameter values can use [dynamic value references](https://docs.databricks.com/aws/en/jobs/dynamic-value-references.md) to inject job-run-time values such as `{{job.trigger.time.iso_date}}` or `{{job.parameters.region}}`. To reference a value set by an upstream task, use `{{tasks.<task_name>.values.<value_name>}}`. See [Use task values to pass information between tasks](https://docs.databricks.com/aws/en/jobs/task-values.md).

Lakeflow Jobs also pushes all job parameters down to pipeline tasks automatically, the same way it pushes them down to notebook and SQL tasks. The pipeline source code can reference any pushed-down value with named parameter syntax. Declaring a parameter in pipeline settings is optional and only sets a default for runs without an override.

## Caveats and known limitations

* **Pipelines run one update at a time**: A pipeline can only run a single update at a time. To prevent jobs from failing when multiple updates would otherwise overlap, Databricks caps concurrency to 1 in two scenarios:

  * A job that contains a pipeline task and is configured with `max_concurrent_runs` more than one.
  * A pipeline task wrapped in a [for-each task](https://docs.databricks.com/aws/en/jobs/tasks/for-each.md), regardless of the iteration count.

  The job UI shows a notification when this cap takes effect. Plan around the cap when designing parameterized pipelines that you intend to run with many parameter combinations.

* **Date filters can trigger full refreshes**: A common parameterization use case is to filter data by date. Take care with predicates: filtering on **both** sides of a date range invalidates incremental processing on materialized views and triggers a full refresh on each update.

  ```sql
  -- Triggers a full refresh on each update
  CREATE OR REFRESH MATERIALIZED VIEW recent_orders AS
  SELECT * FROM orders
  WHERE order_date >= :start_date AND order_date < :end_date;
  ```

  ```sql
  -- Processes incrementally
  CREATE OR REFRESH MATERIALIZED VIEW recent_orders AS
  SELECT * FROM orders
  WHERE order_date >= :start_date;
  ```

* **Named parameters are SQL-only**: Named parameter syntax can only be used in SQL source code. To parameterize Python source code, use the **Configuration** field with `spark.conf.get()`. See [Reference parameters using the configuration field](https://docs.databricks.com/aws/en/ldp/parameters.md#configuration-field).

## <a id="configuration-field" />Reference parameters using the configuration field

The **Configuration** field on a pipeline accepts arbitrary key-value pairs that are exposed as Spark configuration values. This is the legacy parameterization mechanism and continues to work alongside pipeline parameters. Use it for Python source code and for keys that you want to read with `spark.conf.get()` rather than named parameter syntax.

The following example uses a `mypipeline.start_date` configuration value to limit a development pipeline to a subset of input data:

### SQL

```sql
CREATE OR REFRESH MATERIALIZED VIEW customer_events
AS SELECT * FROM source_table WHERE date > '${mypipeline.start_date}';
```

### Python

```python
from pyspark import pipelines as dp
from pyspark.sql.functions import col

@dp.table
def customer_events():
  start_date = spark.conf.get("mypipeline.start_date")
  return spark.read.table("source_table").where(col("date") > start_date)
```

You set Configuration values in the **Configuration** section of pipeline settings or in the `configuration` field of the pipeline JSON. Avoid keys that conflict with reserved pipeline or Apache Spark configuration values.

## Additional resources

* [Configure pipelines](https://docs.databricks.com/aws/en/ldp/configure-pipeline.md)
* [Pipeline task for jobs](https://docs.databricks.com/aws/en/jobs/tasks/pipeline.md)
* [Configure job parameters](https://docs.databricks.com/aws/en/jobs/job-parameters.md)
* [Dynamic value references](https://docs.databricks.com/aws/en/jobs/dynamic-value-references.md)
