Question

1) Is there any way to select a random record from Freebase? If I do a limit of 1, it consistently returns the same record. I could grab the larger data set and select a random rec from that but that seems like overkill. Analogous to MySQL's :

select * from profiles order by rand() limit 1;

2) Is there any way to tell Freebase not to select certain items in a set?

Analogous to MySQL's :

select * from profiles  where id NOT IN (SELECT profile_id from approved_profiles)

Thanks in advance

Was it helpful?

Solution

Sorry, right now MQL doesn't have a random operator. This thread on the Freebase discussion list suggests using a random as_of_time parameter as a work-around.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top