Return only distinct rows in the table.
Example

Example Input
dim_A | dim_B | metric_1 |
AAA | DDD | 111 |
AAA | DDD | 222 |
AAA | DDD | 333 |
BBB | EEE | 444 |
BBB | FFF | 555 |
CCC | GGG | 666 |
CCC | GGG | 777 |
CCC | HHH | 888 |
Example Output
dim_A | dim_B | metric_1 | entry_count |
AAA | DDD | 111 | 3 |
BBB | EEE | 444 | 1 |
BBB | FFF | 555 | 1 |
CCC | GGG | 666 | 2 |
CCC | HHH | 888 | 1 |
I Ain't Afraid of No Code!
[
[
"distinct",
{
"subtable": null,
"presorted": false,
"key": [
"dim_A",
"dim_B"
],
"count": "entry_count",
"_comment": null
}
]
]
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param list key: When passed comparison is performed on given key instead of all fields.
param str count: When passed it will be used as name for an additional field containing the number of matching rows under the given key.
param boolean presorted: Default is false.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.