Importing and exporting the DW in PB is really easy to use.
After nearly a week of exploration, although I have not fully understood all the functions of DW settings for XML templates, It is enough for me to use.
DW Import and Export XML, you can create an XML template in the design of the DW canvas, a DW can set multiple different XML templates, that is, you can set different templates for the export or import. A template can be saved as another template through SAVEAS. You can OPEN an existing template and DELETE the currently edited template. Different DW templates can have the same name. The template settings are placed at the end of the DW source code. After the template is designed, you can specify the corresponding template in the data export data import tab of the DW attribute. You can also dynamically specify the template in the script.
When designing a template, the fields selected in DW may not be included in the template. If the fields not specified in the template are not exported or imported, data is not included in the DW canvas, it will not be selected in the template canvas. The order of fields in the template is irrelevant to the order of fields in the DW canvas.
The design of the master table and sub-table template can be designed into a multi-level XML format, as long as the identity is set according to the XML format order. The Identification name must be one-to-one correspondence with the XML Identification name. You can use a Chinese Identification name. The field name may not be a Chinese name.
For imported templates, if the primary table and sub-table are off the system, the starts detail mark cannot be added at the beginning of the sub-Table identity. For the exported template, if it is a relation between the master table and sub-table, the starts detail mark must be added at the beginning of the sub-Table ID.
What will happen to the data imported from the primary table and sub-tables? The data in the primary table appears only in the first row, and no data in the other detail rows is in the primary table. If you want to import data to the database, you need to process it here. It is better to convert the data to the DW corresponding to the master and sub-tables and then save the disk.
If the order of the imported XML tags is different from that of the XML template, I tried to reconcile the first and second tags of the XML file. After the import, the data after the call appears in the second row. Therefore, make sure that the order is the same.
In addition, if the XML file does not contain the identifier in the XML template, the DW field value is empty. It does not affect the import of other data.
You can also add calculation columns in the XML template.