Retrieving values of context variable from database

One Star

Retrieving values of context variable from database

I want to retrieve the values of context variables from database instead of defining them in job. I have created a table for the same in form of Key-Value , but don't know how to move forward please help me as it's urgent.As i want to use the context variables defined from database and hence load them dynamically.
Seventeen Stars

Re: Retrieving values of context variable from database

Open your job. Go to the Job view and open the Extra Tab.
Here you can check implicit context load and use database table for it.
The table must have minimum 2 columns (key, value) both character types (length 255).
You can add more columns like job_name and in the mentioned setting you find also the possibility to set the Query condition. Lets say, you have added a column job_name: you would write in the condition: "job_name='" + jobName + "'"
Keep in mind in SQL you have to quote strings.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch