Creating Properties file using TOS for Data Integration

0 votes

Is it possible in Talend to store the properties in an external file and later use it in any Job using Talend Open Studio for Data Integration?

Apr 28, 2018 in Talend by v.liyyah
• 1,300 points
1,554 views

1 answer to this question.

0 votes

Yes, you can easily create external properties files in Talend. In order to do so, first, you need to create a properties file, suppose “demo.properties” and place this file in the c:/etc/classpath path. Next, assign the property you want to specify in this file.

Now go to the repository of Talend Open Studio and right click on Contexts section and select create context group and add the same property as the external file to it. image

Create a job which can read and load the properties. Below I have created a simple job to fulfill the requirement:

image

In the tFileInputDelimited component set the delimiter as “=” for columns and set the schema for the key-value pair such as:

Key → String

Value → String

Now, create another job which will invoke the previous job. In this, invoke the previous job using a tPrejob component and load the contexts into a tContextLoad component. Add a tJava component which will be responsible for writing the context properties. Add the following code in the tJava component:

System.out.println(context.your_property_name);

image

Finally, execute the 2nd job to get the desired results.

answered Apr 28, 2018 by code.reaper12
• 3,500 points

Related Questions In Talend

0 votes
1 answer

how to add data to existing file and how to use LIST properly ??

Hi, @Aminegac yes, in the output file there's ...READ MORE

answered Dec 4, 2020 in Talend by Gitika
• 65,770 points
1,859 views
0 votes
1 answer

Code for converting multiple .xml files to .json file format

Hey, @AAron, I would suggest you go through ...READ MORE

answered Dec 18, 2020 in Talend by Gitika
• 65,770 points
2,815 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 11, 2018 in Talend by geek.erkami
• 2,680 points
2,484 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 17, 2018 in Talend by code.reaper12
• 3,500 points
6,156 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer
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