Creating one or multiple contexts for the same analysis - 6.2

Talend Real-time Big Data Platform Studio User Guide

English (United States)
Talend Real-Time Big Data Platform
Talend Studio
Data Quality and Preparation
Design and Development

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.

Prerequisite(s): You have already created a database analysis in the Profiling perspective of the studio.

To define one context for an analysis, do the following:

  1. Double-click the database analysis to open the analysis editor.

  2. Select Window > Show View > Profiling > Contexts to open the context view in the Profiling perspective.

  3. In the Contexts view, click the [+] button at the top right corner to open the [Configure Contexts] dialog box.

    A Default context is listed by default.

  4. Select the default context and click Edit to rename it, prod in this example. Click OK in both dialog boxes.

    The context environment is named accordingly in the table in the Contexts view.

  5. Click the [+] button at the bottom of the view to add lines in the table and define the name and values of the context variables.

    Suppose that you want to profile a postal_code column and you want to analyze only the postal codes that start with 75. Name the variable where_clause and set the value to postal_code like '75%'.

    For further information about contexts and their variables, see How to define context variables in the Contexts view and How to centralize context variables in the Repository.

To define a second context for an analysis, do the following:

  1. To add a new context, click the [+] button at the top right corner in the view and then click New... in the [Configure Contexts] dialog box.

  2. Enter a name for the new context, dev in this example, and then click OK.

    The legacy of the context selected as default in the context list is copied to the new context which is created and listed in the dialog box and in the Contexts view.

  3. Click in the context table and modify the values of the new context as needed.

    In this example, set the value of the where_clause for the dev context to postal_code like '15%'.

  4. Repeat the above three steps to add as many context environments as needed.

  5. Click at the bottom of the view to import any of the contexts created and centralized in the studio repository and use it with the current analysis.

For detailed information on contexts and their management, see Managing Metadata for data integration.