Calling One YQL Query Keyed by Another in Yahoo Pipes
The following isn’t on of my hacks – it comes from @pjdonnelly – but it contains a pattern I’d like to remember so I’m blogging it anyway…;-)
The issue it addresses is how to make on YQL query based on another. Once you see the pattern, it’s obvious…
Call the first query to retrieve a set of results that contain a key value you want to use in the second “as-if nested” query:
(The environment variable is store://datatables.org/alltableswithkeys.)
then simply use a Loop block to construct a query string for each item based on a key value contained in that item, (genrating queries of the form select source from flickr.photos.sizes where photo_id="4179541452" and label = "Medium") and another loop to run the query:
Very nice… and another example of a pragmatic approach to pipelinked data queries. ;-)


