# Add the query pushdown parameter to the Table Input or MongoDB Input steps

The input step allows you to query the data source. These instructions explain how to add a parameter that will act as a `WHERE` clause in the SQL query or the equivalent type of clause in the MongoDB query.

1. [Create a transformation](/pdia-data-integration/archived-merged-pages/transforming-data-with-pdi-archive/work-with-transformations-cp/create-a-transformation.md) that has a Table Input or MongoDB Input step.
2. [Run your transformation](/pdia-data-integration/archived-merged-pages/transforming-data-with-pdi-archive/work-with-transformations-cp/run-your-transformation.md) to ensure it executes properly.
3. Double-click the input step (Table Input or MongoDB Input) that contains the query you want to optimize.
4. Add a parameter to the location of the `WHERE` clause value, like this:
   * SQL Query Example: `SELECT * FROM media WHERE ${countryParam}`
   * MongoDB Query Example: `{$match : ${mongoDbParam}}`
5. Press CTRL SPACE to view the list of parameters. Click on a parameter from the list to add it to the query.
6. Select the **Replace Variables in Script?** checkbox.
7. Click the **OK** button.
8. [Set up the Query Pushdown Parameter Optimization](/pdia-data-integration/archived-merged-pages/pentaho-data-services-archive/optimize-a-pentaho-data-service/apply-a-query-pushdown-optimization/set-up-query-pushdown-parameter-optimization.md).


---

# 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://docs.pentaho.com/pdia-data-integration/archived-merged-pages/pentaho-data-services-archive/optimize-a-pentaho-data-service/apply-a-query-pushdown-optimization/add-the-query-pushdown-parameter-to-the-table-input-or-mongodb-input-steps.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.
