> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Parameters in Data Analysis

> Reuse values for flexible pipeline execution

Parameters let you dynamically control values in pipelines. Instead of hard-coding values into your pipeline, you define them once as parameters and reference them wherever needed. At runtime, you choose which values to use.

Use parameters when a value:

* Changes between environments (for example, dev vs. prod).
* Should differ between pipeline schedules.
* Is shared across multiple pipelines.
* Will correspond to user-entered fields in [analysis dashboards](https://docs.prophecy.ai/data-analysis/analysis/overview.md).

## High-level workflow

Using parameters in Prophecy follows a simple flow:

1. Define parameters to declare the values your pipeline expects.
2. Reference parameters inside gems in pipelines.
3. Run pipelines using a specific set of parameter values.

This page focuses on step 1: defining parameters.

## What are parameters?

A parameter is a named placeholder for a value that may change between runs.

For example, instead of hard-coding a file path in the pipeline, such as `s3://my-bucket/prod/customers/`, you define a parameter called `customers_path` and assign it the value `s3://my-bucket/prod/customers/`.

Inside the pipeline, you reference the parameter rather than the literal value.

Parameters are defined in [parameter sets](https://docs.prophecy.ai/data-analysis/development/parameters/parameter-sets.md), which group related parameters together. Every project and pipeline has a default parameter set, which serves as the baseline definition. You can later create additional parameter sets—for example, one for development and one for production—without redefining the parameters themselves.

## Types of parameters

Prophecy supports two scopes for parameters:

* Project parameters
* Pipeline parameters

The scope determines where a parameter can be used and how it behaves at runtime.

| Parameter type | Description |
| - | - |
| Project parameters | Shared across all pipelines in a project. Project parameters support concrete types. Values are interpreted based on their content.  For example, expressions like `concat("first_name", "last_name")` are recognized as valid SQL and evaluated accordingly, rather than treated as literal strings. |
| Pipeline parameters | Specific to a single pipeline. String expressions are evaluated at runtime. If you define a pipeline parameter called `concat("first_name", "last_name")`, the value injected during usage is `first_namelast_name`.  |

> [!NOTE]
>
> If a pipeline parameter and a project parameter share the same name, the pipeline parameter overrides the project parameter.

### Parameter storage and editing

All parameters are defined in `parameters.py`. If a parameter can be represented in `dbt.yaml`, it is also written there. Otherwise, it remains only in `parameters.py`.

This enables support for richer data types that are not compatible with YAML.

Parameters can be edited through:

* The visual editor
* `parameters.py`
* `dbt.yaml` (when supported)

### Supported data types

Prophecy supports typed parameters at both the project and pipeline level.

| Data type | Description |
| - | - |
| Array | A list of values of the same type, added one by one in a multi-value input field. Stored in `parameters.py`. |
| Boolean | A true or false value, selected from a dropdown. |
| Connection | A connection in the current [fabric](https://docs.prophecy.ai/data-analysis/environment/fabrics/prophecy-fabrics.md). |
| Date | A calendar date in `dd-mm-yyyy` format, chosen using a date picker. Stored in `parameters.py`. |
| Double | A 64-bit floating-point number entered in a numeric field. |
| Float | A 32-bit floating-point number entered in a numeric field. |
| Int | A 32-bit integer entered in a numeric field. |
| Long | A 64-bit integer entered in a numeric field. |
| SQL Expression | A SQL expression, either configured through dropdown menus or entered as custom code. |
| String | A plain text value, entered via a single-line text input. |

## Define parameters

You intiially define parameters by adding variables to the default parameter set. You must define values for default parameters.

To define project or pipeline parameters:

1. Open the parameter settings.

   > [!NOTE]
   >
   > For pipeline parameters, you must open the relevant pipeline first.

   ![Open parameter settings](https://mintcdn.com/prophecy-62973bd0/-ItDi7_tv0_ASK3D/data-analysis/development/parameters/img/open-parameters.png?fit=max\&auto=format\&n=-ItDi7_tv0_ASK3D\&q=85\&s=7c3afc35929b1e346173a43067fa9a4b)

2. Select either the **Project Parameters** or **Pipeline Parameters** tab.

3. Click **+ Add Variable**.

4. Enter a name and a value for the variable.

5. Click **Save**.

### Usage (precedence and selection)

At runtime, you can use both project and pipeline parameters.

When multiple values are defined, parameters are resolved in the following order (lowest to highest priority):

1. Default project parameter set
2. Custom project parameter set
3. Default pipeline parameter set
4. Custom pipeline parameter set

### Connection parameters

Connection parameters reference fabric connections rather than storing scalar values such as strings or numbers.
You can use connection parameters to make pipelines portable across environments while preserving connection-type safety.

Connection parameters are:

* Scoped to the current fabric.
* Restricted to compatible connection types.
* Validated against available fabric connections.
* Revalidated when switching fabrics.

See the [connection parameters example in Use Parameters](https://docs.prophecy.ai/data-analysis/development/parameters/usage.md#connection-type) for an implementation example.

### Migration behavior

Project parameters have been enhanced as as version `4.2.7`. If you created project parameters in earlier versions, Prophecy automatically migrates them to the new system.

During migration:

* Values in double quotes are treated as strings
* Numeric values are inferred as numeric types
* Values are parsed using a SQL parser:
  * If valid SQL → stored as SQL expression
  * Otherwise → treated as string

## What's next?

Now that you understand how parameters are defined, continue with:

* [Using these parameters](https://docs.prophecy.ai/data-analysis/development/parameters/usage.md) in your pipelines and analyses.
* [Creating additional parameter sets](https://docs.prophecy.ai/data-analysis/development/parameters/parameter-sets.md) at the project or pipeline level.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.