Difference between two tables
This topic describes the Difference Between Two Tables operator.
Purpose
The Difference Between Two Tables operator finds the difference between two data tables based on specified conditions.
Scenarios
Compute Link | Compute Engine | Support |
Offline | MaxCompute | Yes |
Hive | No | |
HiveStorage | No | |
RDS/MySQL | No | |
Spark | No |
Instructions
Source nodes
You can specify two source nodes for the Difference Between Two Tables operator. These nodes are also known as input nodes. Each source node is treated as a table. The operator calculates the difference between the two source nodes.
Difference conditions
You can specify one or more fields from each source node as the difference condition. The result is a collection of records from the left input node whose values for the specified fields do not exist in the right input node. The following figure illustrates this process.

For example, assume that the two input nodes are A and B. If you set the difference condition to "A.ID - B.ID", the result is displayed on the right in the figure below.
Output fields
You can configure the list of fields that the current node outputs to its descendant node. By default, all fields from the left source node are included. You can remove fields as needed.