union command: Examples

The following are examples for using the SPL2 union command. To learn more about the union command, see How the SPL2 union command works.

1. Union events from multiple datasets

The following example merges events from the customers and orders index datasets, and the vendors_lookup dataset. You must separate the dataset names with a comma.

You can also embed the union command in the from command by using a subsearch in the FROM clause expression:

2. Union events from an incoming set of search results

The following example merges events from incoming search results with an existing dataset.

3. Union the results of a subsearch to the results of the main search