In this article
...
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| The SQL query in which you want to add the SELECT DISTINCT statement. |
Output | Document |
|
| The SELECT DISTINCT statement added to the incoming query. |
Snap Settings
Info | ||
---|---|---|
| ||
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 Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| ELT Unique | Distinct Records | ||||||||
Get preview data | Check box |
| Not selected | Selected |
...
We need a SELECT DISTINCT query to retrieve distinct values from a table. This example shows how we can use a combination of the ELT Select and ELT Unique Snaps to accomplish this task.
First, we build a SELECT query to read the target table. To do so, we can use an ELT Select Snap. This Snap is configured to output a SELECT * query to read the target table in the database. Additionally, this Snap is also configured to show a preview of the SELECT query's execution:
A preview of the output from the ELT Select Snap is shown below:
Then, we add an ELT Unique Snap to the ELT Select Snap. Upon execution, the ELT Unique Snap adds the SELECT DISTINCT statement to the incoming query as shown:
...