Skip to main content
This gem runs in .

Overview

Use the Except gem to extract rows that are present in the first table but absent from all subsequent tables. This is useful for identifying gaps, such as missing orders, unprocessed records, or customers who haven’t returned.
The gem has a corresponding interactive gem example. See Interactive gem examples to learn how to run sample pipelines for this and other gems.

Input and Output

To add additional input ports, click + next to Ports. All input tables must have identical schemas (matching column names and data types).

Parameters

Example

Let’s say you’re working with two tables: Table A and Table B.
  • Both tables contain order-related data.
  • Table A contains order information from customer 1, 2, and 3.
  • Table B contains order information from customer 1, 2, 3, and 4.
  • These tables contain some identical records (duplicates).

Table A

Table B

Result

Default

The table that results from the Except gem only includes records in Table A that are not in Table B.
The output indicates that order 101 and 102 appear in Table A, but not in Table B.

Preserve duplicates

If you select the preserve duplicates option, the gem preserves the duplicates from Table A.
The output is the same as above, except the gem also retains the duplicate order 101.