In this article

The page's title should always be the Snap's name.  For example, File Reader. 


Use this Snap to add an INTERSECT SQL operator to the separate queries coming from upstream Snaps. This Snap also allows you to preview the result of the INTERSECT SQL operation on the incoming SQL queries. You can validate the modified query using this preview functionality.


The INTERSECT SQL operation does not eliminate duplicate records. You can add the ELT Unique Snap to the ELT Intersect Snap to remove duplicates. 




Known Issues

Snap Input and Output

Type of view: Document/Binary/Both. Get number of views from the Views tab in the Snap. List at least three compatible Snaps in each category. Provide a brief of the input/output required. If the input/output is optional then preface the description with "Optional." For example, "Transaction data complying with the Orderful schema as a JSON document."

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription


  • Min: 2
  • Max: No limit
  • ELT Select
  • ELT Aggregate
Multiple SQL queries.


  • Min: 1
  • Max: 1
  • ELT Merge Into
  • ELT Insert-Select
The incoming SQL queries joined with the INTERSECT operator. 

Snap Settings

You can use the SQL Expressions and Functions supported for ELT to define your Snap or Account settings with the Expression symbol = enabled, where available. This list is common to all target CDWs supported. You can also use other expressions/functions that your target CDW supports.

Parameter NameData TypeDescriptionDefault ValueExample 
ELT IntersectCommon Records
Get preview dataCheckbox

Select this checkbox to include a preview of the query's output. The Snap performs limited execution and generates a data preview during Pipeline validation.

In case of ELT Pipelines, only the SQL query flows through the Snaps but not the actual source data. Hence, the preview data for a Snap is the result of executing the SQL query that the Snap has generated in the Pipeline.

The number of records displayed in the preview (upon validation) is the smaller of the following:

  • Number of records available upon execution of the SQL query generated by the Snap.

  • The value set in the Preview Data Count setting (default is 50 records).

Based on the data types of the fields in the input schema, the Snap renders the complex data types like map and struct as object data type and array as an array data type. It renders all other incoming data types as-is except for the values in binary fields are displayed as a base64 encoded string and as string data type.

Not selectedSelected
Retain duplicates (Databricks Lakehouse Platform only)Checkbox

Select this checkbox (when your target database is Databricks Lakehouse Platform) to include duplicate records/values, if any, that match the intersection criteria in the output data set. Else, the Snap does not retain any existing duplicate entries in the output.

This setting is ignored in case of all other supported target databases/CDWs except Databricks Lakehouse Platform.

Not selectedSelected




Retrieving Common Records Between Two Tables

We need a query that combines two SELECT queries with an INTERSECT operator to retrieve common records between two tables. This example shows how we can use the ELT Intersect Snap to achieve this result.

First, we build SELECT queries to read the target tables. To do so, we can use two ELT Select Snaps, in this example: Read Part A and Read Part B. Each of these Snaps is configured to output a SELECT * query to read the target table in the database. Additionally, these Snaps are also configured to show a preview of the SELECT query's execution as shown:

Read Part A ConfigurationRead Part B Configuration

A preview of the outputs from the ELT Select Snaps is shown below:

Read Part A OutputRead Part B Output

Then, we connect the ELT Intersect Snap to the output view of the ELT Select Snaps. The SELECT * queries in both of these Snaps form the inputs for the ELT Intersect Snap. Upon execution, the ELT Intersect Snap combines both incoming SELECT * queries and adds the INTERSECT operator.

A preview of the ELT Intersect Snap's output is shown below:

We can add also an ELT Insert-Select Snap downstream and write the result of this query into another table.

Download this Pipeline.

Retaining Duplicate Values/Entries in Intersection Data (Databricks Lakehouse Platform)

In this example Pipeline which connects to a Databricks Lakehouse Platform database, we demonstrate how you can retain duplicate records in the common data that the ELT Intersect Snap produces in the output.

We use two ELT Select Snaps to capture data from the two different datasets that we want to extract common records from.

ELT Select Snap (Source 1)

Snap Output

ELT Select Snap (Source 2)

Snap Output

Let us connect the Snaps (that produce these two datasets) to the two input views of the ELT Intersect Snap. Notice that we have selected the Retain Duplicates (Databricks Lakehouse Platform only) check box to ensure that the Snap includes duplicate matching records in its output view.

ELT Intersect Snap

Snap Output

We can see that the output of this Snap contains exactly four matching records including a duplicate record ("FIRSTNAME": "Bruke", ...)

In the end, we write this list of common records between the two source data sets into a DLP table out_ma_dl_elt_intersect_02 by configuring the ELT Insert Select Snap as shown below:

Download this Pipeline.


  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Furnish Pipeline parameters as applicable.

Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt. 

See Also

Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.