Use of Implicit tContextLoad

One Star

Use of Implicit tContextLoad

To load a context I used tFileInputDelimited and tContextLoad.
It also worked using "Implicit tContextLoad from file".
But can't make it work using a database as a source. Tried both ways, tContextLoad and Implicit tContextLoad.
Using Implicit tContextLoad, I have two problems:
- How do I fill Query condition field? Is it obligatory?
- In the components that use this context, is it ok (Port field as example): context.port?
My database is like:
"key" "value"
"database" "dbname"
"host" "hostname"
"password" "password+"
"port" "3306"
"username" "root"
Thanks, Rober
Community Manager

Re: Use of Implicit tContextLoad

Hi
You can load the value of context variables from any data source. From database, the query should be:
"select key, value from your_table_name"
The job looks like:
tMysqlInput--main--tContextLoad
   |
onsubjobok
  |
other business processing
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Use of Implicit tContextLoad

Ok, thanks.
But in the Contexts Tab I have a filename (File type) field, which worked when using a file. Leaving it like this works, but should I remove that value? Or change it?
Rober

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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch