Skip navigation

Add Record ID / Index feature in Tableau Prep  [partially Released | 2020.1.3]

score 250
You have not voted. Active

Adding a unique record ID to data has a number of use cases, some of which are met by the forthcoming ROW_NUMBER() function in Prep Builder 2020.1 (now in beta):


(1.) Identifying the original sort order of the data when there are no field(s) available that would define the sort. For example manually-entered Excel data, machine-generated data without timestamps, exports of data frames from R or Python where the tools will automatically generate row numbers from the raw data, etc. all have this issue.


Based on how Tableau Prep's Input step loads data at this time the sort order of the data is not guaranteed so the ROW_NUMBER() feature in 2020.1 does not meet this need.


(2.) Generating a single column primary key when the data does not have one. This can be done using the ROW_NUMBER() feature in 2020.1.


(3.) Creating new numeric IDs to blind data. This can be done using the ROW_NUMBER() feature in 2020.1, the usual pattern would be something like - branch to an Aggregate with the field to be blinded in the GROUP BY, add something to sort the data such as the undocumented RANDOM() function, add a row number as the blinded ID, then join that back to the original data using the field to be blinded, then remove that field whilst keeping the blinded ID.


(4.) Creating new numeric IDs to replace existing alphanumeric keys that are overly large (e.g. UUIDs). This can be done using the ROW_NUMBER() feature in 2020.1, this would use a pattern like the one described in #3.


In my work we see all these use cases regularly and without that support in Tableau Prep we're not able to use it.


This idea goes with  on sorting output in Tableau Prep. Note that the ROW_NUMBER() and RANK functions in the 2020.1 beta include sorting for these functions as part of the outer {ALONG [field 1], [field2] } statement.


[updated 20191216 by Jonathan Drummey with notes on what will be feasible in the 2020.1 release and what's still TBD]



--> Community Manager update [Ciara Brennan]

Also refer to Duplicate idea #9852 ( 4 Votes )

Note that 3 out of the 4 scenarios listed in this idea are now released. Idea remains 'Active' and open for votes to show support for scenario (1)


cc'ing Tony Hoad as fyi


Vote history