This action is used to merge multiple rowset elements of data in an XML output document into one rowset. A multiple rowset document can be created in one of the following ways:
Create an Aggregate query that in turn aggregates multiple query templates
Create a document using the document actions
Use the default multiple rowset elements that many tag connectors return
This action should be used with result sets that contain a known date and time column, such as a query result from a tag-based datasource. In many cases, the query result from such a datasource is more than one rowset. The Normalize action combines multiple rowset elements into one rowset using the date and time values of the first rowset in the multiple rowset document. Elements (tags) that appear in the row element of each rowset are combined into the row element of the single rowset output.
The properties for this action are listed in the following table:
Property | Data Type | Access | Use |
Source | String | In and out | The path to the source XML document. |
Output | XML | In and out | Contains the normalized data set. |
Success | Boolean | Out | Indicates whether the action succeeded or failed. If it failed, errors are displayed in the server trace log. |
You want to join two tag queries with the Union action and use the Normalize action to combine the rowsets and output the results.
Create a new transaction.
Add two Tag Query actions.
The source for the first tag-based query should be Simulator. The tags that are returned are CylTemp1, CylTemp2, CylTemp3, and CylTemp4. The query is a history query, the row count is set to five, and the time range is the last hour.
The source for the second tag-based query should be InSQL; however, if you do not have InSQL you can use another Simulator query. The tags that are returned are L1Speed, L2Speed, L3Speed, and L4Speed. The query is a history query, the row count is set to five, and the time range is the last hour.
Add a new sequence with a Union action.
Add a transaction property named XMLout and specify this property as an output of the transaction.
Configure Source Document 1 as IllumTagQuery_Simulator.Results and Source Document 2 as IllumTagQuery_InSQL.Results.
Add a new sequence with the Normalize action.
Set the configuration to Union_0.Output.
This sends the XML output of the Union action to the input XML of the Normalize action. Therefore, the Union action combines the two result sets into one document that contains multiple rowset elements, and the Normalize action eliminates the multiple rowset elements by combining the data into one rowset.