Creating and Adding a Context Group to Your Job - TALEND

(4.0)

| 1903 Ratings

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.

MindMajix Talend Training course is designed to make you an expert in developing ETL solutions using Talend platform. Start Learning!

How to accomplish it…

The steps for creating a context group are as follows:

Open the metadata panel, and right-click on the context section.

Select the Create context group

Name the new group cookbookGeneral.

Click on the Next button, and you will see the main context variable panel.

Click on + to add a new variable and type in cookbookDirectory.

Set the type to the Directory.

Now, click on the Values as a table tab, and click on the Default column for cookbookDirectory. Click on the …

This will open a directory navigation window, so navigate to the cookbook data directory, and click on Finish.

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.

Open the context panel, and click on the context icon shown as follows:

You will then be presented with the list of available context groups.

Select cookbookDB, and then Ok.

You will now see that the cookbookDB context variables have been added as read-only variables into the job.

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.

Subscribe For Free Demo

Phone *

E-mail Address *

Free Demo for Corporate & Online Trainings.

About The Author

Ravindra Savaram is a Content 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.

Mindmajix - Online global training platform connecting individuals with the best trainers around the globe. With the diverse range of courses, Training Materials, Resume formats and On Job Support, we have it all covered to get into IT Career. Instructor Led Training - Made easy.