Show TOC

Function documentationUnion Locate this document in the navigation structure

 

This action is used to combine two data sets into one aggregate data set. Its functionality is similar to a UNION clause in standard SQL.

Features

The properties for this action are listed in the following table:

Property

Data Type

Access

Use

Source1 and Source2

String

In and out

The paths to the Source1 and Source2 XML documents.

Output

XML

In and out

The XML output that contains the aggregated data set.

Success

Boolean

Out

Indicates whether the action succeeded or failed. If it failed, errors are displayed in the server trace log.

Example

You want to combine two queries by the category ID and return the aggregate data set. The Source 1 document is defined by the following Northwind database query Select * From [Sales by Category]. The Source 2 document is defined by the following Northwind database query Select CategoryID, Description From Categories.

To combine these two queries, do the following:

  1. Create two new SQL query templates that use Northwind as a datasource and the two fixed queries mentioned above, and save them.

  2. Create a new transaction.

    1. Add a transaction property named XMLout and define it as an output of the transaction.

    2. Add two SQL query actions.

      1. Assign the query template for the first SQL query action to the Source 1 document template.

      2. Assign the query template for the second SQL query action to the Source 2 document template.

    3. Add a new sequence with the Union action.

      Configure it with Source Document 1 equal to IllumSQLQuery_0.Results and Source Document 2 equal to IllumSQLQuery_1.Results.

    4. Map the output of the Union action to the XML output transaction property.

    The output of the transaction is the aggregated data set.