Determine the Transformation Schema
To prepare for the transformation project:
- Determine the goal of the project, such as indexing data, analyzing data, combining data, and so on.
- Examine the XML file and note the file structure and element names.
- Choose the elements to import and decide if any other limits are appropriate.
For example, the following XML file, prices.xml, is a simple, short file that contains price records. Each price record contains two fields: an item number and a price.
<?xml version="1.0" encoding="ISO-8859-1" ?><prices><pricerecord><itemnumber>708421</itemnumber><price>19.99</price></pricerecord><pricerecord><itemnumber>708466</itemnumber><price>59.25</price></pricerecord><pricerecord><itemnumber>711121</itemnumber><price>24.99</price></pricerecord></prices>
The goal is to import all the data into a HAWQ table with an integer itemnumber column and a decimal price column.