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 27, 2018 in Talend by v.liyyah
• 1,300 points
241 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 27, 2018 by code.reaper12
• 3,450 points

Related Questions In Talend

0 votes
1 answer

Special issues while using WSO2

To choose an ESB for integration, you ...READ MORE

answered Apr 9, 2018 in Talend by anto.trigg4
• 3,420 points
83 views
0 votes
1 answer
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
354 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
718 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer