# Creating one or multiple contexts for the same analysis

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

You can create one or several contexts for a database analysis and select specific context values with which to execute the analysis. Defining context variables in analysis will enable you to run the analysis on different data using the same connection.

## Defining contexts in analyses

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

### Before you begin

You have created a database analysis in the Profiling perspective.

### Procedure

1. Double-click the database analysis to open the analysis editor.
2. Select Window &gt; Show View &gt; Profiling &gt; Context to open the context view.
3. Click Manage environments.
4. In the Manage context environments window, select the context and click Rename.
5. Rename it to Prod and click OK.

   ![Overview of the Rename context environment window.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/context_in_analyses.png)

## Defining variables in analyses

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

### Before you begin

You have created a database analysis in the Profiling perspective.

### Procedure

1. Click the [+] button to add lines in the table.

   Suppose that you want to profile a postal\_code column and you want to analyze the postal codes that start with 15 in the development environment and with 75 in the production environment. You also want to allow different concurrent connections per analysis in the two environments.
2. Click in the Name field and enter the name of the variable you are creating.

   In this example, the first variable is where\_clause.
3. Repeat the above steps to define all the variables for the different contexts.

   In this example, set the value of the where\_clause variable in the Test context to postal\_code like '15%', and for the Prod context to postal\_code like '75%'. Set the value for the concurrent connections per analysis in the development and production environments to three and five respectively. ![Configuration in the Context view following the procedure.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/context_in_analyses6.png)
4. Click ![Manage variables](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/contexts.svg) at the bottom of the view to import any of the contexts created and centralized in the Talend Studio repository and use it with the current analysis.