How to: Read the XML Data
The XML data will include the table structure and what data to pull or filters, and/or what data to insert into the database. The XML data that you get from the Job monitor has been unscrambled for you so you can see the field names and text data, but if you are looking at data from TS Query, the fields are still scrambled. You should still get an idea of whether the data you are looking for or the table design is correct by looking at the XML data.
-
To unscramble the text, you can paste it into the Base64 String to convert field to see the actual data in the DD Configuration tool:
-
Open the file with an XML editor or an Internet explorer:
There are 2 main sections, <QueryDef> that includes a query for DD to pull data from the database, and <InsertDef> that includes the data to insert into the database.
Both start with table and field design:
<QueryDef> has both source table and result table design, the result table is under the <ResultDef> section, while source is outside that section, usually after the <ResultDef> section. <InsertDef> only has the design of the destination database.
<QueryDef> can include a filter section <ParamFieldDef>, if not all data is supposed to be selected from the source table. This section includes field and Lookup Code and data to let DD know what filter to apply to the query. Values in the <PLD> section are applied to the filter fields, one per field, except if the Lookup Code is Range, 2 values will be applied to that field, as from value and to value.
<InsertDef> has a list of values <VLD> to insert into the database and the number of values should match the number of fields in the database design. The <VLD> entry also includes a number sequence of the record to be inserted, so the last record should tell you how many records are included in the job, so values can be matched to the field that they are supposed to go into.
There can be more than one table in the XML Data, each table and query are separated with either a <QueryDef> or an <InsertDef> section. In case of Insert, if an error occurs in one of the tables, the whole job will be canceled and rolled back.