You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hi, I have a complex problem which I have to solve using talend. I have a source table with product groups which look like:
ID | Description | Parent-ID
1 | Men|
2 | Women|
3 | Jeans | 1
4 | slim | 3
5 | Jeans | 2
6 | regular | 5
Now I have to change the description on the basis of the parent ID so I have the complete path of the group like this:
1 | Men
2 | Women
3 | Men / Jeans
4 | Men / Jeans / slim
5 | Women / Jeans
6 | Women / Jeans / regular
Does anyone know how I can archive this?
Thank you very much for every hints you give.
best regards Marco
Offline
Hi thank you much for your hints.
But how could this multi stage process look like?
What I could imagine but are not familiar with is to read all the lines into an array or something like that and use my own java code to iterate over that array and change the description of the groups. Would that be a way and if yes how would the transformation look like?
regards, Marco
Offline
I think you should have a look at "recursive queries".
For example the following url:
http://database-programmer.blogspot.be/ … table.html
Regards
Offline
@mpa: Thank you. That looks very interesting! Sadly my DB doesnt support that! Any other suggestions? what is with my proposal to write a java code which iterates over an array with the datasets and directly manipulating the fields?
regards Marco
Offline
Ok, seems, that I've found a solution.
I send the datasets from my sql table to a tBufferOut. OnComponentOk I use a tJavaFlex to change the descriptions within the buffer. OnComponentOk I use a tBufferIn and write my changed datasets to a file.
regards, Marco
Offline
Pages: 1