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,440 points
1,140 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';


Hope this helps!

To know more about Talend, join Talend for big data certification training today.

Thanks.

answered Apr 18, 2018 by geek.erkami
• 2,680 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 17, 2018 in Talend by code.reaper12
• 3,500 points
6,171 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,500 points
1,648 views
+1 vote
1 answer
0 votes
2 answers

Closed loop in Talend

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

answered Aug 23, 2019 in Talend by vinceall
2,334 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,680 points
1,409 views
0 votes
1 answer

tWaitForFile component insufficiency in Talend

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

answered Apr 11, 2018 in Talend by geek.erkami
• 2,680 points
2,510 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP