OUseful.Info, the blog…

Trying to find useful things to do with emerging technologies in open education

Calling One YQL Query Keyed by Another in Yahoo Pipes

leave a comment »

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. ;-)

Written by Tony Hirst

December 21, 2009 at 12:05 pm

Posted in Pipework

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 134 other followers