One Star

tDenormalize

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
13 REPLIES
Moderator

Re: tDenormalize

Hi,
Thanks for your question.
Actually, tDenormalize helps synthesize the input flow. There should be different columns name denormalized.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tDenormalize

Thanks for your reply,
so if I understand correct the output column name cannot be the same as the input column name?
Suppose I have only 1 input column (name1 for example) and 1 output column(name2 for example) on the tDenormalize component, with different names as mentioned, then I get an error in talend when i run this saying that 'name1 cannot be resolved or is not a field'.
Moderator

Re: tDenormalize

Hi,
so if I understand correct the output column name cannot be the same as the input column name?

It depends on your requirement. You must have some confusion on schema setting on tDenormalize. I can design a demo job for you to explain this component if necessary.
Suppose I have only 1 input column (name1 for example) and 1 output column(name2 for example) on the tDenormalize component, with different names as mentioned, then I get an error in talend when i run this saying that 'name1 cannot be resolved or is not a field'.

Is it a real case? If so, please give us your job screenshots so that we can get your situation more precisely.
In additional that, elaborating your case with an example with input and expected output values will be preferred.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tDenormalize

I uploaded a screenshot, but I don't know how I should get it to show up here....
Moderator

Re: tDenormalize

Hi,
For registered users, please click on "post reply" (not through the quick post").
Here is limitation: 20 images per post(max), each image must be less then 1024x768 pixels and 200 KB.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tDenormalize

Trying again Smiley Happy
Ok it works,
as shown I took the example from your website and changed the names as you indicated, because I understood from your reply that the names should be different.
One Star

Re: tDenormalize

and here is my original example, with 2 different types....
so the documents (left side of scheme) are ending up in the list (right side of scheme).

Hmmm I think I misunderstood you indeed... i only use 1 column... still it is providing me with functionality I would not know how to otherwise get, namely to put multiple rows in 1 list...
Moderator

Re: tDenormalize

Hi,
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),

I designed a demo job for this case.
input;
father;children
pieer;york
Dan;rain
pieer;marry
Dan;sun
Dan;cloud
expected output;
father;children
pieer;york;marry
Dan;rain;sun;cloud
What we need to get a group of father, which means different columns name should be denomalized in the 'To denormalize' list.(In this case, children)
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: tDenormalize

Hi,
so the documents (left side of scheme) are ending up in the list (right side of scheme).

It seems you are looking for a converting data type component. Would you mind taking a look at tConvertType.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tDenormalize

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)
Moderator

Re: tDenormalize

Hi,
For your log in issue, could you please check Forum 29406-NOTICE TO ALL TALENDFORGE USERS: maintenance completed to see if it is useful for your login issue.
Sorry for any inconvenience.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tDenormalize

Here is the screenshot, tConvertType cannot convert from Document to List...
Moderator

Re: tDenormalize

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
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.