0

I am very new to Pentaho. I have one table, it has type column which has different data, such as XML, text.

Here I am sending ex of type data: Type :

1."<HIntDetails>  <sKey>3</sKey>   <pID>132</pID>  <SName>Holt, R A</subjectName>  <facilityId>H</facilityId>  <facilityId>C</facilityId>  <summaryView>false</summaryView>  <timestamp>2013-12-30 (...)"     ---XML
2."<cliMessageKey>707</clinicalMessageKey>"
3."<details>  <methodName>getSourcesByFilter</methodName>  <parameters>                -----XML
<string>FacilityFilterModel{simpleStr=&apos;null&apos;, globalIdFuzzy=&apos;null&apos;, globalId=&apos;HEC&apos;, exactOnId=true, label=&apos;null&apos;, consumerOfLabs=null, creato (...)"         -------XML
4."PKey=77 SKey=30 pNameFormatted=Hoon, M F method=CONVERTER"              --text

Now I have to read this table and update the target table.

My target table has the below fields:

Skey
Pkey
Pgroup
PID

I have to read that table type column and I need to update the target, but I am not sure which tasks I need to accomplish this one.

JulianHarty
  • 3,178
  • 3
  • 32
  • 46
  • Check the documentation of the Get data from XML step in PDI: http://wiki.pentaho.com/display/EAI/Get+Data+From+XML – nsousa Jun 12 '15 at 11:52
  • Thank you nsousa. Do you have idea about Text type? – user4355016 Jun 12 '15 at 19:20
  • From PDI's point of view, any text is simply a string. Whether it lands on a Varchar database field or a text db field it's all the same to pdi. Is this what you mean? – nsousa Jun 15 '15 at 08:58
  • Thank you for your Suggession. I was able to read XML . But could not able to read Text values. Eg of Text values : "PKey=77 SKey=30 pNameFormatted=Hoon, M F method=CONVERTER" when i am using split field to rows task and follewed by Split fields data is coming like this: SKey=30 PKey=77 pNameFormatted=Hoon, M F method=CONVERTER I need data like below format : Target table: Skey Pkey pNameFormatted Pgroup 30 77 Hoon, M F null Can you please explain me lit bit clearly which transformaton and delimiter need to use. Thanks in Advance! – user4355016 Jun 15 '15 at 17:13
  • You should group all lines of input data into a single line, which is the XML field you'll want to use. Use a Group by step with "concatenate strings separated by" and just add a white space on the character field for the concatenation. Then you can pass that field to the Get Data from XML step. – nsousa Jun 16 '15 at 10:00

0 Answers0