One Star

Dynamic excel file as input for talend job

I'm using Talend open Studio for big data, version:5.6.1
what I have to do is to give Talend an excel file everyday 2 weeks, with the same number of columns but with more data (rows), and I use the data inside of this excel sheet to feed a database.
is there a way to do this given that I will have to run the job through batch file?
One Star

Re: Dynamic excel file as input for talend job

Yes, there is a way to pass Excel files dynamically. You will have to follow the below steps:
1. Create a Talend Job (Sample Job Name: ExcelToOracle) .
2. Pass the file name dynamically using "contexts" in the Talend tool itself.
3. Build this job and pass the jar file to Java project (Refer the link:
3. Write a Java code to invoke this Talend job as follows:
public static void main(String[] args) throws Exception {
ExcelToOracle e = new ExcelToOracle();
String [] context=new String []{"--context_param filePath="+"D:/ExcelInput.xls"};
4. Put this Java code in a scheduler.
   Omkar V. Kulkarni.