Recently, because of the work business needs, has been studying the PDI tool parsing XML, JSON and other format data methods, parsing XML and JSON are simpler.
When parsing XML, just select the appropriate file (not necessarily the XML file, TXT, as long as the data is XML format can), and then select the loop read path, set the label to the name:
One: Select the file, if the XML data is entered in the previous procedure, do not select the file:
Second: Select the node that parses the XML, and the node you choose should be the root node of the data:
Three: Set the corresponding node name and data name:
Once the configuration is saved, you can run it.
The corresponding parsing JSON is also similar to XML parsing:
A: If it is the file data, select the corresponding file, if it is fluent in the field, the corresponding field can be configured.
Two: Configure the path and read the JSON.
A concrete example of parsing JSON is as follows:
If you are not quite sure you can go to my resources to download "Pentaho Data integration Cookbook 2ed.pdf", there is a detailed explanation.
Kettle (PDI) method for parsing XML, JSON, and other format data