You are not logged in.
Hi, I've just started using TalenD and still learning the basics. I am trying to design a process in which I extract values from a configuration file (xml) for use in the rest of the process, stuff like connection information. These values are extracted fine through tFileInputXML, however I have no idea how to assign those values to a context. Can anyone help?
Thanks in advance
Thanks for the help, I will give it a shot.
So there is no component where you can manage this? I'd love to see contexts be included in tmap.
I worked with Adobe Livecycle before and I would just create a loop, each time it executed the value was changed to the next and assigned to that variable, then I used the variable anywhere I needed in that loop.
I really like what talenD can do, but I do miss that functionality, I am still having a hard time grasping the concepts of how data actually moves. I am sure I'll get it one of these days.
As for how I envision it, well if we are talking about a repeating field then it wouldn't work without a similar loop. However, it would be great for reading values out of a config file, or something similar.
Also, for some reason when I put tLogRow after my tJavaRow, the log does not output context values, so I have to use another component to actually test variable assignment.
It sounds like what you're looking for is tFlowToIterate, which will loop the following components for each incoming row from tFileInputXML. Note, though that it places the values in the globalMap rather than the context but using them is no different (apart from syntax).
tLogRow will show the values in the flow. A statement like my suggestion changes the context, which is not part of the flow. You can assign the context value to an output column from tJavaRow if you want to send it on to tLogRow e.g. output_row.newColumn = context.myFirstContext;
You can also use tContextDump to create a flow of context values that you can pass to tLogRow. But tContextDump should be linked with OnSubjobOK from tFileInputXML so it only runs after tFileInputXML is complete i.e. has all context values populated and outputs them only once.