In Azure DocumentDB / CosmosDB, is it possible to get random sample?

Viewed 1113

I'm looking for functionality similar to $sample in mongodb, but it doesn't seem to be supported in Azure's Cosmos DB. Is there any other way to get a random subset (up to a specified size of documents)? Something like the logic of SQL's

SELECT col FROM table 
ORDER BY Random()
LIMIT 100;

could also work?

1 Answers
Related