Recursive YQL table

Hi,

in my table's <execute>, I'd like to make a y.query call to the same table (with different parameters, obviously). Recursion, that is. YQL is giving an error about making a circular call to the table...

CODE

Exception: Circular table reference detected while using 'deepdapper'. This table was already used in the call stack deepdapper

I find no clear statement whether or not recursion is supported, so could someone just make a confirmation on this?

And if I would cloak the call as a rest call? Would that be a problem?

Recursive calls to the same table in the call chain are not supported. If it is cloaked as a rest call, the yql depth originating from the current table would indicate this and prevent this rest call. This is done to prevent any harm to the YQL servers actually. Can you describe your use case a bit more? Maybe there's another solution to the issue?

-- Nagesh

QUOTE (vic m @ May 31 2010, 12:02 PM)

Hi,

in my table's <execute>, I'd like to make a y.query call to the same table (with different parameters, obviously). Recursion, that is. YQL is giving an error about making a circular call to the table...

CODE

Exception: Circular table reference detected while using 'deepdapper'. This table was already used in the call stack deepdapper

I find no clear statement whether or not recursion is supported, so could someone just make a confirmation on this?

And if I would cloak the call as a rest call? Would that be a problem?

Recursive calls to the same table in the call chain are not supported. If it is cloaked as a rest call, the yql depth originating from the current table would indicate this and prevent this rest call. This is done to prevent any harm to the YQL servers actually. Can you describe your use case a bit more? Maybe there's another solution to the issue?

-- Nagesh

Hi,

thank you very much for that information!

My attempt was to scrape data from paged html content. The table would scrape the content from the first page (the one provided in the where clause), then go looking for a 'next page' hyperlink and call itself again providing the next page url in the where clause, and return the collected data from the first page bundled with the data collected by the recursive call.

I guess I may have to look into the Open Tables paging functionality, or rewrite the algorithm as a loop.

My attempt was to scrape data from paged html content. The table would scrape the content from the first page (the one provided in the where clause), then go looking for a 'next page' hyperlink and call itself again providing the next page url in the where clause, and return the collected data from the first page bundled with the data collected by the recursive call.

I guess I may have to look into the Open Tables paging functionality, or rewrite the algorithm as a loop.