Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a requirement where in a generic talend extract job i have a tJavarow to perform input-output mapping.
Is there any way where we can read all the mappings from a text file and load to tJavarow component.
please note this is a big data job.
Thanks
Badri Nair
Technically you could do something like this with a lot of Java code. But when it comes to your input schema and output schemas you cannot change them dynamically during a job. You can use the Dynamic schema to deal with unknown schemas if you have Data Fabric.
This sounds like you are trying to recreate something done in a different integration tool. Maybe if you give your use case we can help point you in a way of doing it that is better suited to Talend.
Hi,
Thank you for the response. THis is in relation to the other question that I had " genric job to run on AWS and CDH".
The schema is fixed and it is stored. We would just like to load the input output mappings into a tJavaRow component .
Can you please show us how that is possible.
Thanks
BAdri Nair
Examples of how to use the tJava components is given here...
https://help.talend.com/reader/NFGUc8bs6NnLij6GaHwLEg/AJeBU6YQ6Q1j~ENrb2w8YQ
You might find that using the tJavaFlex may be more useful to you in some situations as it gives you a bit more control.
The thing to remember with the tJavaRow is that the input and output rows are NOT the same as those actually feeding or coming out of the component. They are used like this....
output_row.id = input_row.id;
....assuming the input row is "row1", the output row is "row2" and the column is "id", you would pass the data through as above. This is not the same with the tJavaFlex which uses the input and output row names as supplied.
You can set the schemas using the schema button or can simply connect your adjoining components to have the schema set that way.