After checking the documentation, I have noticed that SQLRender does not provide a translation from MS SQL Server queries to select N random rows from the result set (https://github.com/OHDSI/SqlRender/blob/master/inst/csv/replacementPatterns.csv), in the shape of
SELECT TOP 1 column FROM table ORDER BY NEWID()
Any particular way that people are getting around this issue?
As background, I need to select N random patients from a subset of patients that is sometimes in the millions. I don’t want to bring the whole list of patient_id’s to R and then do a random sample from there. Is there a recommended way of doing this?
Thanks!