Hi,
Question about the tDenormalize component.
Suppose my tDenormalize component retrieves multiple rows of type Document, lets say the name is 'myColumn'.
When I change the scheme of the tDenormalize component to have an output column of the same name 'myColumn', but of type List and add 'myColumn' in the 'To denormalize' list, then it seems my rows are combined in this list(and the output is 1 row), which is exactly what I want. Only thing is I don't see this feature documented, is this behaviour as expected and will it stay this way in future releases?
Thanks, greetings Bert
Hi, I tried tConvertType, but I get an error message that it cannot cast a document to a list, I cannot attach a screenshot, because I cannot log in to the forum for some reason... (it redirects from the website back to forum ok, but on forum it says not logged in, while I am logged in on talend.com)
Hi,
You have set your input schema as XML Document type, right?
It is impossible to use tConvertType to explicitly convert the input 'Document' type to 'list'. You can replace your tConvertType by a tJavaRow and do the transformation by yourself.
For example, 'Document' type to 'string'
In the tJavaRow:
row2.docAsString = row1.myDocument.getDocument().getRootElement().asXML();
docAsString is a String column in the row2 link and myDocument is a Document column in the row1 link.
Hope it is useful for you.
Best regards
Sabrina