Assigning Context Variable from the database value

0 votes

I have an Oracle database table which contains the data in the following format:

key | variable

name | BigDecimal

Also, I have a BigDecimal context variable which I need to link to the database so that later I can use this context variable in any SQL query. Can someone guide me, how can this be done in Talend?

Apr 19, 2018 in Talend by code.reaper12
• 3,450 points
240 views

1 answer to this question.

0 votes

I think if you want to link a specific value from the database table to the context variable then you have to add a tOracleRow component and execute the following query:

"select a, b, c from table1 where a = '" + context.xyzVariable + "'";

Then you need to add a tJavaRow component and add the below code:

context.xyzVariable = input_row.myColumn;

I think this will work fine to give you the desired result.

answered Apr 19, 2018 by geek.erkami
• 2,640 points

Related Questions In Talend

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Naming the output based on a column value in Talend

You can try to solve this problem ...READ MORE

answered Apr 19, 2018 in Talend by 93.lynn
• 1,570 points
355 views
0 votes
1 answer

Looping through all the schemas in Talend

It is really simple to make tOracleInput ...READ MORE

answered Apr 10, 2018 in Talend by code.reaper12
• 3,450 points
126 views
0 votes
2 answers
0 votes
1 answer

tWaitForFile component insufficiency in Talend

Regarding your first issue, tWaitForFile component provides ...READ MORE

answered Apr 10, 2018 in Talend by geek.erkami
• 2,640 points
346 views
0 votes
1 answer

How to load a set of files into database using Talend

Using tFileList component,  you can read all the files present ...READ MORE

answered Apr 16, 2018 in Talend by code.reaper12
• 3,450 points
709 views
0 votes
1 answer

Database Migration In Talend

You can easily migrate your database by ...READ MORE

answered Apr 18, 2018 in Talend by code.reaper12
• 3,450 points
157 views
0 votes
1 answer

Accessing Talend Project from SVN

According to my understanding, there are two ...READ MORE

answered Apr 9, 2018 in Talend by geek.erkami
• 2,640 points
224 views
0 votes
1 answer

Uploading CSV files into database

In order add the header data into ...READ MORE

answered Apr 16, 2018 in Talend by geek.erkami
• 2,640 points
55 views