# Parameters & Variables

{% hint style="info" %}
Both variables and parameters in Pentaho Data Integration enable you to create a more dynamic and reusable pipeline.

Variables are often used within transformations and jobs for storing values, while parameters are mainly used in jobs to pass dynamic values to transformations.

Let's expand on that ..

Think of a parameter as a local variable .. They are reusable inputs that apply only to the specific transformation or job, they are defined in. When defining a parameter, you can assign it a default value to use or you can dynamically fetch it.

Variables are used to store values that can be used across multiple jobs and transformations. They can be defined at different levels of scope, such as global or local. So, for example, suppose you have multiple transformations that read data from different CSV files and write it to a database. You can define a variable for the database connection string and use it across all of these transformations.
{% endhint %}

{% embed url="<https://www.loom.com/share/6f73339cdead464f8ee2a5bebd233e99?hideEmbedTopBar=true&hide_owner=true&hide_share=true&hide_title=true>" %}
Parameters & Variables
{% endembed %}

#### Workshops

{% tabs %}
{% tab title="Parameters" %}
{% hint style="info" %}
In Pentaho Data Integration (PDI), parameters are variables that allow you to make your ETL (Extract, Transform, Load) processes more dynamic and reusable. They can be used to pass values into your transformations or jobs, making it easier to customize and control the behavior of your data integration processes.
{% endhint %}

{% content-ref url="/pages/9SePwI7KWHitrcMjk70T" %}
[Parameters](/pentaho-data-integration/data-integration/enterprise-solution/parameters-and-variables/parameters.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Variables" %}
{% hint style="info" %}
Variables can be used throughout Pentaho Data Integration, including in transformation steps and job entries. You define variables by setting them with the Set Variable step in a transformation or by setting them in the kettle.properties file in the directory.
{% endhint %}

{% content-ref url="/pages/aVybfJDrgkU4erWm6PHI" %}
[Variables](/pentaho-data-integration/data-integration/enterprise-solution/parameters-and-variables/variables.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.pentaho.com/pentaho-data-integration/data-integration/enterprise-solution/parameters-and-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
