1 of 1 people found this helpful
Here is what Tableau Desktop Help has to say on the subject:
...You can extract All, the Top N rows, or a Sample from the data source. Tableau first applies any filters and aggregation and then extracts the number of rows from the filtered and aggregated results.
The number of rows options depend on the type of data source you are extracting from. For example, not all data sources support sampling so that option is not always available.
I guess it relies on data source's built in functionality to pick random rows. I also guess that in Oracle the SQL equivalent would be something like:
--select 100 random rows
SELECT column FROM
(SELECT column FROM table
ORDER BY dbms_random.value) --dbms_random.value is Oracle's built-in random number generator
WHERE rownum = 100;
Something similar can also be found in other databases, but, as Tableau Help helpfully hints, not all.