Last October, Yahoo announced the Yahoo Query Language, a language similar to the popular database language SQL. Then, this February, Yahoo also announced its first major product that made use of YQL, the Open Data Tables, which allowed developers to create their own table definitions besides the ones already provided by Yahoo. As we reported in March, Yahoo then went ahead and extended YQL with YQL Execute, which gives developers even more flexibility and basically turns the web into a giant database that can be processed and mashed up with YQL. Today, Yahoo announced that it has completed its set of YQL verbs with three more functions (INSERT, UPDATE, DELETE) that now also allow developers to not just read and manipulate data, but also write data back to other services.
We talked to Yahoo! Chief Technologist, Sam Pullara, (@spullara on Twitter) and Jonathon Trevor, the product lead for YQL yesterday. They specifically stressed that Yahoo was trying to stay as close to the SQL language as possible, as this would allow the largest number of developers to make use of YQL without having to learn yet another new language.
While the earlier incarnations of YQL were mainly meant to read data, with the addition of these three new SQL verbs, the focus has now shifted towards writing data back to the net as well. Developers can now use YQL to write and modify data on web services and applications.
To explain how useful this can be, the Yahoo team used a few different examples. A developer can now easily use YQL to update a Twitter account (even authentication with OAuth is possible), for example, or add a new comment to a blog post, or insert any data into a remote database. Basically, developers can now use YQL to write data back to any web site that uses forms for data entry and to any API, including authenticated APIs.
To try this, here is an example from Yahoo (you will have to log in to the YQL console):
Try creating a new tweet from the YQL console, follow this link <a href="https://developer.yahoo.com/yql/console?q=use%20%27http%3A%2F%2Fwww.yqlblog.net%2Fsamples%2Ftwitter.status.xml%27%3B%20insert%20into%20twitter.status%20(status%2Cusername%2Cpassword)%20values%20(%22Playing%20with%20INSERT%20UPDATE%20and%20DELETE%20in%20YQL%22%2C%20%22twitterusername%22%2C%22twitterpassword%22)">to run this</a>:
use 'http://www.yqlblog.net/samples/twitter.status.xml';
insert into twitter.status (status,username,password) values ("Playing with INSERT, UPDATE and DELETE in YQL", "twitterusername","twitterpassword")
Pullara and Trevor also stressed that because Yahoo runs YQL on five datacenters spread over three continents (three in the US, one in Europe, and another one in Asia), executing commands through YQL is generally very fast. Yahoo also set some relatively generous rate limits for the service. Developers who use the service and who identify themselves with an access key can make up to 100,000 calls per day, while anonymous users are restricted to 1000 calls per hour, which is still a pretty good number.
Comments
Subscribe to comments for this post OR Subscribe to comments for all ReadWriteWeb posts
Curious how form data will be submitted when it the form validation has a token-based security check on it. Any thoughts?
Exactly what the worlds needs...another db and another query language.
@gern You are missing a huge part of what YQL is doing here. Where is "another db" you're referring to?
Joe,
It will of course vary by whatever the web site is. I can think of solutions that are as simple as needing the user's username and password (to get the secret/session key) to do the POST. This type of solution is certainly less than ideal - but offers a practical way forward.
One of the interesting aspects of I/U/D is that while there are some really great web services to connect to, there are nowhere near as many that support writes. The point being made about the POSTs is that we've seen a lot of people getting at data thats still (sadly) trapped in HTML using YQL (and other systems). Often those types of sites support updates via POST forms too - so it'll be interesting to see how many get added as open data tables (since the functionality is easy to "inspect" and duplicate in a table)
Gern,
YQL attempts to take all the various sources of data on the internet and provide a consist mechanism for addressing and manipulating that data. YQL itself isn't a database - but treats those web sources of data as virtual "tables" for developers to act upon.
Jonathan
Excellent work!
This is my first visit to your website, and though I've missed the date to enter your blog into that competition (by 23 hours!), I've bookmarked you for next year (you've got my vote!!). :-)
thanks so much 4 a nice topic. it's really a wonderful