Ahsan
Ahsan

Reputation: 17

How to combine rows with similar data to form collection in pentaho

I have a SQL view step 1 that give me the data in the form

Pool ID | Pool Alias Name
-----------------------
   1    | pool alias 1   
   1    | pool alias 2   
   2    | pool alias 2-1

Now I want in the next step, i.e step 2 to combine the data to form an xml string

 <POOL>
    <POOLID>1</POOLID>
    <LIST>
      <POOLALIASNAME>pool alias 1</POOLALIASNAME>
      <POOLALIASNAME>pool alias 2</POOLALIASNAME>
    </LIST>
    </POOL>

Upvotes: 0

Views: 467

Answers (1)

Codek
Codek

Reputation: 5164

Are you using PDI/Kettle i.e. the ETL tool? I assume so as you;re talking about steps..

Is your data already sorted by pool id then pool alias? If so you dont need an additional "Sort rows" step. So all you need now is the XML output step.

Did you try this? what problems did you have?

Upvotes: 1

Related Questions