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 Talend Studio repository before importing it to the Context view of the Job.

Procedure

  1. Right-click the Contexts node in the Repository tree view and select Create context from the menu.
  2. In the open wizard, enter a name, purpose, and description for the new context. Call it CampaignIdContextGroup in this example.
  3. Click Next to define the context variables.
    A context named Default is created and set as the default environment.
  4. Click the [+] button 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 the Default column cells 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 Context view under the Job in the design workspace.
    If you can not see the Context view, select Window > Show view > Talend > Context.
  10. Drop the new group from the Repository to the Context 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!