Skip to main content Skip to complementary content

Defining context variables for campaign IDs

Use campaign IDs to define context variables and pass them to the Job at runtime to decide what campaign to populate with your data.

About this task

This procedure explains how to define a context group and its context variables in the studio repository before importing it to the Contexts view of the Job.

Procedure

  1. Right-click the Contexts node in the Repository tree view and select Create context group from the menu.
  2. In the open wizard, enter a name, purpose, and description for the new context group. Call it CampaignIdContextGroup in this example.
  3. Click Next to move to the second step and start defining the context variables.

    A context named Default is created and set as the default environment.

  4. Click the [+] button below the table and add three lines.
  5. Click in the Name fields and enter names for the variables you are creating, CampaignId_Dev, CampaignId_QA, and CampaignId_Prod in this example.
  6. Keep the default String type for the three variables.
  7. Click in the Value fields and enter as quoted text the ID of each of the Dev, QA and Prod campaigns defined on the Talend Data Stewardship instance.
    Information noteNote: You can get the campaign technical name from the Campaign ID filed in the Advanced settings view of the tDatastewardshipTaskOutput component once you connect the Job to the campaign. Otherwise, you can retrieve it from the campaign URL on the Talend Data Stewardship instance or from Talend Data Stewardship REST API.
  8. Click Finish to close the wizard and create the group under the Contexts node.
  9. Open the Contexts view under the Job in the design workspace.
    If you can not see the Contexts tab, select Window > Show view > Talend > Contexts to open the Contexts view in Studio.
  10. Drop the new group from the Repository to the Contexts view.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!