Chapter

YQL Module

YQL Module

YQL (Yahoo! Query Language) allows you to perform SQL-like commands to tap into XML and JSON data. To successfully use this module, it helps to have a working knowledge of SQL. You can also visit http://developer.yahoo.com/yql/guide/index.html for more info.

The YQL Module is an advanced module that will only make sense if you understand YQL. To get the full effect, you’ll need to review the official YQL guide here: http://developer.yahoo.com/yql/guide/running-chapt.html

You can enter your YQL query in the text box of the YQL module, or click on the “Try in the console” link to test out your query on the official Yahoo YQL page.

This is what the console looks like:

YQL Module

You can also choose to display the results as: “Results only” or “Diagnostics and results”. The diagnostics provide additional info including count and language type.

Here is a basic YQL statement that is grabbing Flickr photos near “Las Vegas, NV” with the tag “mgm grand”:

select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text=”las vegas, nv”) and tags = “mgm grand”)

YQL Module

If we drill down the content, we can see that Yahoo Pipes provides us with a lot more info about each picture including:

  • Description
  • Format
  • Tags
  • Author
  • Date taken
  • Location
  • etc.

YQL Module

0 Comments ↓

No comments yet.

Leave a Reply