User-defined parameters are supplied to your Job during runtime, and this is known as "context." During the promotion of your job from development to test and production, the values of context variables may change. We've outlined the steps for building and adding a Context Group to your Talend job.
A context group is a set of (usually) related context variables for use within a project. This recipe shows how to create a new context group.
If you would like to Enrich your career with a Talend certified professional, then visit Mindmajix - A Global online training platform: “Talend Online Training” Course. This course will help you to achieve excellence in this domain.
How to accomplish it…
The steps for creating a context group are as follows:
How it works…
The context group is created in the metadata panel, and the individual context variables can then be added, along with their default values. Because we chose the type as the Directory, Talend gives us the option of using a windows dialogue to simplify the mechanism for selecting the directory we wish to use.
------ Related Page: Using tContextLoad and Implicit Context Loading to Load Contexts in Talend ------
There’s more…
In this recipe, we have created a basic context, but there are more features that you can explore.
Context types
The context dialogue allows many different types of context variables to be defined, and in some cases, as in this recipe, it will provide a dialogue to make definition easier.
Prompt for variable values using the tree mode
Updating values in the context group can also be done in the tree mode. This is an alternative method that differs in one important way.
The tree mode provides an option that will prompt for a value to be displayed at runtime, by checking the prompt box for a variable.
The prompt will appear at runtime, as shown in the following screenshot, and is a useful means for providing test values when developing a job:
A job will not automatically use a CONTEXT GROUP. This exercise shows how to add a context group to a job.
Frequently Asked TALEND Interview Questions & Answers
Getting ready
Open the jo_cook_ch06_0010_addContextGroup job.
How to achieve it…
The steps for adding a context group to your job are as follows:
------ Check Out Talend Tutorials ------
How it works…
The context dialogue within a job allows single (in the job) contexts, as well as context groups, to be added to a job.
There’s more…
The preceding method shows how to add all context variables into a job. There is also an option to add only a subset of the variables within the group, if you drill down into the context group when selecting, demonstrated as follows:
Tip
Another method of adding the context to the job from the metadata is to drag the context metadata icon in the Contexts panel.
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
Talend Training | Dec 07 to Dec 22 | View Details |
Talend Training | Dec 10 to Dec 25 | View Details |
Talend Training | Dec 14 to Dec 29 | View Details |
Talend Training | Dec 17 to Jan 01 | View Details |
Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.