4Oct/171
Google Cloud BigQuery Selecting Random Sample
Following is the sudo code to select random rows in Google Cloud BigQuery:
SELECT *
FROM {TABLE}
WHERE RAND() < {number of random rows}/{total rows}
Following is the sudo code to select random rows in Google Cloud BigQuery:
SELECT *
FROM {TABLE}
WHERE RAND() < {number of random rows}/{total rows}
March 15th, 2018 - 08:27
This can also be used to select one in a thousand rows or 1 in a 100000 rows.