Parameterizing a tOracleInput component using Talend

0 votes

I am working on a Job in which I have a tOracleInput and a tFileOutputDelimited component. I want to filter the incoming data which I think can be done using a “WHERE” clause but my problem is I also have to pass the filtered data as an argument for the remote execution of the job as Jar files. Also, I need to name my output file same as the first argument passed during execution.

Please do share your ideas and suggestions on this.

Apr 18, 2018 in Talend by anto.trigg4
• 3,420 points
199 views

1 answer to this question.

0 votes

I think you should use context variables. You can create two context variables (output_file & where_val ) of “String” type.

Now, in the component tab of the tOracleInput type the below code to concatenate the where clause:

"select * from my_view where field" + context.where_val;"

Next, in the tOutputDelimited component’s name field, you can use the context variable to name your output file: 

"/home/user/" + context.out_filename”.

I think these will fulfill your requirements. After this, you can easily access your job remotely. In the terminal, you can type in the command as below:

my_job_launcher.sh --context_param output_file='output.txt' --context_param where_val='>7';
answered Apr 18, 2018 by geek.erkami
• 2,640 points

Related Questions In Talend

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
759 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
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
183 views
0 votes
1 answer
0 votes
2 answers

Closed loop in Talend

Hi, Talend specifies that tUnite cannot be ...READ MORE

answered Aug 22 in Talend by vinceall
392 views
0 votes
1 answer

Connecting tJIRAOutput component using Talend

Your entire configuration is correct apart from ...READ MORE

answered Apr 19, 2018 in Talend by geek.erkami
• 2,640 points
173 views
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
393 views