Skip to main content

Load DISTINCT Values Into a Node

There a few ways you can load DISTINCT data into Coalesce.

View Node Type

First load your data into a View node and select DISTINCT values. Then create your Stage or Persistent stage from the View node.

View Nodes

The View Node Type is disabled by default, but can be enabled in your Build Settings > Node Types.

A screenshot of a data mapping configuration screen. The left-hand side of the screen shows a list of columns, their data types, and their sources. The right-hand side of the screen shows a form for configuring the properties of the selected column.

GROUP BY ALL Clause in Join

If you want to use an existing Node Type like a Stage or another Node Type that doesn't offer the DISTINCT toggle, you can add a "GROUP BY ALL" clause in the Join tab of the Node Editor, which achieves the same behavior and, due to the way Snowflake operates, performance as DISTINCT.

The image displays a STG_REGION node configuration with a Join tab active. It contains a short SQL query with a GROUP BY ALL clause highlighted in red.

Create a Custom Node Type With SELECT DISTINCT Behavior

If you wish to have a Node Type with this functionality built in so you can use it for many Nodes without having to complete one of the approaches detailed above, you can duplicate an existing Node Type and edit the Create Template (for View behavior) and the Run Template (for Table behavior) to include the DISTINCT keyword in the SELECT, so that it is automatically included for all Nodes of this new Node Type.

The image shows a code editor for a Stage - Distinct node with a Create Template tab selected. The code includes SQL-like syntax with a SELECT DISTINCT statement highlighted in a red box.
DISTINCT in the Create Template
The image shows a code editor interface for a Stage - Distinct node. The Create Template tab is selected, displaying SQL-like syntax. A SELECT DISTINCT statement is highlighted in a red box within the code snippet.
DISTINCT in the Run Template