...
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.
Note |
---|
The INTERSECT SQL operation does not eliminate duplicate records. You can add the ELT Unique Snap to the ELT Intersect Snap to remove duplicates. |
...
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| ELT Intersect | Common Records | ||||||||
Get preview data | Check boxCheckbox |
| Not selected | Selected | ||||||||
Retain duplicates (Databricks Lakehouse Platform only) | Checkbox | When your target database is Databricks Lakehouse Platform, select this checkbox to include duplicate records/values, if any, that match the intersection criteria in the output data set. Else, the Snap does not retain duplicate entries in the output. | Not selected | Selected |
Troubleshooting
None.
...
We can add also an ELT Insert-Select Snap downstream and write the result of this query into another table.
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 make sure 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.
Downloads
Note | ||
---|---|---|
| ||
|
...