I'm new to talend, I have java code which need to get data from files. I want to use them in talend job. Now am facing problem how to use this java code in talend, I created routine but facing problem in creating jar files, and also how should I use this routine in my job.
Asked
Active
Viewed 1,093 times
-1
-
You need some tutorial friend, but hope my answer [here](http://stackoverflow.com/a/38122161/2037229) helps ! – 54l3d Sep 01 '16 at 14:03
-
Please describe your input file format. There may be a talend component that can easily read and parse your file. – dbh Sep 04 '16 at 21:48
1 Answers
1
I don't know what you want to do but normally you would use the build-in Talend components for reading a file.
Depending on your File you are going to read you can use:
- tFileInputRaw - for reading a file line by line
- tFileInputDelimited - for reading CSV files (getting a set of columns)
- tFileInputExcel - for XLS/XLSX files (getting a set of columns)
If you want to use your code anyway you have to make your routine available to your job. To do that, close your job, click right on the job and choose "setup routine dependencies". You should be able to add a routine by click the green "+"-button.
After that you are able to use your functions in a tJava or tJavaRow component with routines.ClassName.functionName().

tchibu
- 56
- 4