Archive

Posts Tagged ‘yql’

Talk in MSRIT

September 5, 2009 Leave a comment

(The blog is on YDN also. http://developer.yahoo.net/blog/archives/2009/03/pipes_yql_talk.html)

On a bright Monday morning, I was giving a talk on Pipes, YQL and web development to a bunch of students in MSRIT. After meeting the HOD of the Computer Science Department and other senior professors, I was taken to the seminar hall. There were at least 100 people in the room. They were all students – under grads, who were in third and fourth year of their Engineering. I was a bit skeptical of they being able to digest what I was going to feed them. But in the end I was pretty happy with the outcome.

First, I spoke to them about web development and how it was discouraged in the present day Universities in India.

Then we spoke about Pipes for half hour. Most of them appreciated the beauty of Pipes. Some of them had already started thinking of using Pipes in their projects. We did a quick demo; where in the news about “Lok Sabha Elections 2009″ was aggregated from various sources (news sites and search) and the data was consumed /displayed else where.

Then we had a look at YQL and that is when I realized the beauty of the YQL console. It is not only easy to write SQL style queries, YQL scores in being easy to demo, evangelize and play around with.
We also touched upon writing open tables with simple examples(Twitter).

In the end we also looked at the other useful services of Yahoo! like BOSS, YUI and what has been built using it.

The Q&A section was Pipes centric. Some questions about licensing and other operators in Pipes.
A couple of them who were building websites for their department and batch were interested in YUI. I wanted to show them YUI Grid Builder but the internet failed on us. So they had to settle for pointers on YUI.

There were two people who came up later and asked if there was any location based services of Yahoo! They were building a low cost GPS system and they were happy to find out Fire Eagle and Geo helped their cause.

I really wish the PR could have arranged for some goodies. The event was overall successful, served its cause.

The feedback that I got was more than satisfactory.

Advertisements

YQL – makes you want to hack more

September 5, 2009 Leave a comment

Yahoo! Query Language (YQL)

YQL is a SQL like Query Language developed by Yahoo! to provide a single interface for all the properties of Yahoo! which have exposed their APIs. The best part of YQL (unlike most of the other (*)QLs) is the concept of open tables, in addition to the 50+ Yahoo tables. You can as well fetch a RSS feed, select what is required, massage them and display it.

What makes YQL even more attractive then other (*)QLs is the Console. Developers can type their queries in the console, test them and get the REST URL for the query.

For quick understanding, let us say that a developer has to:
1. Search for photos from Flickr Search the web for data, photos
2. Search for local business
3. Fetch weather info
4. Fetch(add) events from(to) Upcoming
5. Fetch contacts, updates, profiles from profiles (social)
6. Fetch RSS and render it

The developer can use YQl for the above operations. Sample YQL queries are as below:
1. Flickr photo search
select * from flickr.photos.search where text=’Angelina’
2. Search the web
select title, abstract from search.web where query=’Taj mahal’
3. Read RSS
select title from rss where url=’http://twitter.com/statuses/user_timeline/15722583.rss’
4. Read from a HTML page
select * from html where url=’www.harsharv.com’ and xpath=’//body/div[@id=”doc2″]/div[1]/h1′
5. Social: Fetch contacts for a user
select fields.value from social.contacts where guid=[the guid]
6. Social: Updates for a user
select * from social.updates where guid=[the guid]

Other SQL commands like limit, in, joins, sub-queries, unique hold good too.

Overall, YQL is one of the big hit promises that Yahoo! has shown recently. I personally appreciate and love it. It makes me want to hack more. I will use YQL in situations where I would use pipes.

More examples can be found and tried at http://developer.yahoo.com/yql/console

The documentation can be found at http://developer.yahoo.com/yql/guide