MashZone NextGen 10.2 | Appendix | Legacy Presto components | MashZone NextGen Analytics | RAQL Queries | Joins and Other Multiple-Dataset Operations
 
Joins and Other Multiple-Dataset Operations
 
Join: Merge Columns for Dataset Rows
Union: Append Like Datasets
Intersect: Find Common Dataset Members
Except or Minus: Find All Less the Intersection
You can work with multiple datasets in a RAQL query using any of the following operations:
*Join: Merge Columns for Dataset Rows to perform inner joins that combine columns from two or more datasets into the result for rows that match a specific condition. You can also perform natural joins, cross joins or outer joins, if needed.
*Union: Append Like Datasets to add the rows from two or more datasets into a larger result. The columns and datatypes of all datasets must be identical.
*Intersect: Find Common Dataset Members to find those rows in two or more datasets that are members of all the datasets. The columns and datatypes of all datasets must be identical.
*Except or Minus: Find All Less the Intersection to find those rows in the first dataset that are not members of the second dataset. The columns and datatypes of all datasets must be identical.
The basic query technique to work with multiple datasets uses a separate subquery for each dataset in the following form. This does not apply to join operations.
subquery-one [ UNION | INTERSECT | EXCEPT | MINUS] subquery-two [... optional additional multi-set operators and additional subqueries ...]
The individual subqueries for each dataset follow the same syntax and rules as usual, with one addition. You may need to include both the dataset and column names in the form dataset-name.column-name to clearly identify a column. (See Valid Names for Datasets, Columns, Aliases, Paths and Functions for more information.)
With Join, this basic query technique is applied within the From clause instead, such as:
SELECT columns-expression FROM subquery-one [ JOIN] subquery-two [... optional multi-set operator and subqueries ...] WHERE join-condition

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release