How to Create Context Variables in the Repository


How to Create Context Variables in the Repository

Context variables are user defined variables that can be changed at runtime with different parameters and are a fantastic way to save time and help with collaboration among developers. These variables can be set with different values based on the environment they are run in (For example: test vs production), making it so you don’t have to build the same job more than once. These variables can be created within the job itself, or in the repository as metadata.


To create context variables in the repository you need to go into the repository and right click “Contexts”. This will allow you to create a new context group where you can give it the appropriate name, purpose, and description.




Once you fill out the context group details you can use the green plus sign at the bottom left of the window, where you can choose to add new context variables for your group. Once you have added a new context variable, create a name for your context variable, the data type, any comments you may want to add about your variable, as well as, a value.


Using the plus sign closer to the top right of the window will allow you to add different environments for your variable. Bellow, I created two different environments, “Production” and “Test”, with “Test” being set as the “Default”. Being a “Default” simply means that, if not specified, the value under the “Test” environment will be used for the context variable.




Now that you have created your context variable group you can find them in the same place you created them, the Repository. From there you can simply click and drag them onto the canvas to add them to your job, or you can select the “Contexts” tab in the Configuration tab section, then click on the context variable icon at the bottom left corner. In the tab you can also change the “Default context environment.” Don’t forget you can also reuse these variables as many times as you need to for multiple jobs.




Re: How to Create Context Variables in the Repository


Thanks for sharing it on forum.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: How to Create Context Variables in the Repository

A description of the error. This variable is cleared upon entering a step, and is set when an error occurs during step operation. This variable can only be used in the next step condition. The ErrorDescription is also saved in the C.sys.LastErrorDescription and this value is not cleared. For more information about this variable and  CCleaner  Happy Wheels  VLC


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release


Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend