Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reading java or protobuf object

I have a senario where I recieve real time java or protobuf objects. I need to extract data from those object and store into database. Is there a way in Talend where I can take java object as input and extract fields of that object.
Labels (3)
20 Replies
Anonymous
Not applicable
Author

Hello
There is no component can extract records from an Java object directly, you have to hard code and create an routine to do that, and then call the routine on tJavaRow, for example:
input flow----tJavaRow--tMysqlOutput
on tJavaRow:
output_row.id=RoutineName.getID(input_row.Java object column);

Best regards
Shong
Anonymous
Not applicable
Author

What should be content of routine? The method getID which you have specified takes object property and returns string. But how we will take object as input flow.
Anonymous
Not applicable
Author

Hello
What should be content of routine? The method getID which you have specified takes object property and returns string. But how we will take object as input flow.

It is just my thinking, where does your java ojbect come from and what data do you want to extract?
Best regards
Shong
Anonymous
Not applicable
Author

I have created a routine which will read java object and Using reflection I get values of all the fields of object in the form
id,name,age,course
2,ss,14,science
as one string.
Now I want to use this routine as input so that I can use it in my application which keep on getting object and they are converted into string and we can perform transformation on that data.
How can I use this routine as input or how to create component from that routine.
If require that piece of code I can paste it.
Anonymous
Not applicable
Author

You can use a tfixedflowinput, to read your string, and with a tmap, you can split it in the schema :id,name,age,course
Anonymous
Not applicable
Author

how to make my java routine as input flow in talend.
Anonymous
Not applicable
Author

Can I make my java routine as component. How can I create my own component
Anonymous
Not applicable
Author

Please help me. If you want I can send you my java program. i want to use that java program as input
Anonymous
Not applicable
Author

Hello
What's the return type of your routine? You can call the routine on tfixedFlowInput, set the value as:
RoutineName.Methodname(parameters)
Best regards
Shong