I am trying to execute some queries using YQL. To gain some efficiency, I am thinking of executing them in batches. My queries are in a text file, each in one line. My (Java)program currently reads each query from one line and creates YQL query and executes it. I want this to be done in a batch of 10 or more. I could not find any examples on the web on how to execute this kind. If anybody has done think kind of queries , please do share your experience.
+1
A:
You could use the query.multi
table to make 10 (or more) queries at once, each of the queries will return within a results
block.
For example:
select * from query.multi where
queries="show tables;select * from feed where url='http://www.javarants.com/rss'"
Alternatively it would not take much at all too cook up a custom data table which you can feed in multiple queries at once in whatever format you want to put in, or get out.
salathe
2010-05-21 19:02:01
@Salathe , This solution works fine, but the query.multi takes only a maximum of 28 queries at a time :(. That seems to be the maximum limit. Could you please tell me how do I create a custom table and load for example each line in a text file as a row. That would be of great help. Thanks !!
Pi
2010-05-26 15:17:59
The `query.multi` table can accept an arbitrary number of queries, the upper limit is not hard-coded. However other factors come into play like the size of the YQL query URL (for GET), the time spent making lots of queries, etc.. The XML source for the table is at http://www.datatables.org/data/query.multi.xml which would be a starting point if you want to build your own custom table.
salathe
2010-05-26 15:31:16