--- title: "Using Template Parameters in SQL Lab" slug: "using-template-parameters-in-sql-lab" updated: 2026-09-09T10:53:09Z published: 2026-09-09T10:53:09Z canonical: "docs.preset.io/using-template-parameters-in-sql-lab" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.preset.io/llms.txt > Use this file to discover all available pages before exploring further. # Using Template Parameters in SQL Lab The Template Parameters feature enables the assignment of a set of parameters as JSON and making them available in SQL Lab using the Jinja Framework. In the example below, a virtual dataset based on a movies database named Pagila is used. Then selecting the ellipsis icon, click on the sub-menu item **Parameters**. ``` SELECT CONCAT({{customer_alias}}.last_name, ', ', {{customer_alias}}.first_name) AS customer, {{address_alias}}.phone, {{film_alias}}.title FROM {{rental_alias}} INNER JOIN {{customer_alias}} ON {{rental_alias}}.customer_id = {{customer_alias}}.customer_id INNER JOIN {{address_alias}} ON {{customer_alias}}.address_id = {{address_alias}}.address_id INNER JOIN {{inventory_alias}} ON {{rental_alias}}.inventory_id = {{inventory_alias}}.inventory_id INNER JOIN {{film_alias}} ON {{inventory_alias}}.film_id = {{film_alias}}.film_id WHERE {{rental_alias}}.return_date IS NULL AND rental_date < CURRENT_DATE ORDER BY title LIMIT 5; ``` The Template Parameters panel will appear. In this panel, you can define JSON parameters to represent all the `{{ }}` encapsulated references above, as shown in the example below: ``` { "rental_alias": "rental", "customer_alias": "customer", "address_alias": "address", "inventory_alias": "inventory", "film_alias": "film" } ``` ![Image](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/image(461).png) After applying the above and executing the query, you will get the respective results being returned which also verifies that the template parameters are working correctly. ![Image](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/image(462).png)