We've been updating the YQL console with new tweaks and features for the last few months. This week, we're providing seven changes that we'd like to highlight. Not all are large, but they either increase the console's ease-of-use or bring more powerful capabilities into it. Paul covers a few of these in his companion screencast.
One of the most immediately obvious changes is the move of the REST query box to the bottom of the screen. This gives you more room for your awesome YQL queries!
We've also moved a few links around that box and given you the ability to hide the box until you need it. (So you have more room for the result explorer in the middle.)
Late last year, we enabled developers to create nicely named query aliases using a couple of tables:
yql.queries.admin. They've been a popular addition to YQL's tables and web service, and now we've made them easier to use by integrating them into the console.
First, you need to be logged into Yahoo! while using the console to use this feature. Then make a query that you'd like aliased using the console and click on the Create Query Alias link at the top-left of the query area. If you've not yet chosen your "prefix" for all of your query aliases, then you'll get prompted for it. Pick something easy to remember, like your nickname. Then you're ready to define the alias. Enter a nice short name for the query you want to run when the query alias is used:
Finally, you'll be presented with the two URL aliases that have been created for you.
But there's more. Now you can open the Query Alias box thats in the top left of the console to get a list of all the aliases you've created. Just click on the alias to run it, or choose the x to remove it. This will always be available whenever you log into the console.
New Query String Parameters
If you've created a particularly cool set of tables and want to share with others using the console permalink feature, sometimes your tables can get lost in the 700+ tables we have available. We've added a
_uiFocus query parameter that will automatically open and show all the tables that begin with the value you've specified. For example, here's a link to the console that highlights the YQL tables: http://developer.yahoo.com/yql/console/?_uiFocus=yql
History Not Lost on Back Button
No Login Required
Many of the core built-in tables and most of the community tables will work anonymously (that is, they can be used using the
/public endpoint). So we've removed the need to be logged into Yahoo! to use the console. If you come to the console and you aren't logged in, a warning will appear:
The list of tables on the right will be smaller, as we'll remove those tables that need Yahoo! authentication to work (like the social tables). If you want to use those, you'll need to click on the login link to load the fully featured console. In addition to fewer tables, you won't be able to get query aliases.
Auto-Linking "Debug" Links
When you are developing an open data table, it is incredibly valuable to see what's going "over the wire" between YQL and the web service or source being called on the network. The YQL web service and console has supported a query parameter,
debug, to do just that for some time now. Setting this to
true not only circumvents the HTTP caching YQL normally puts in to boost performance of YQL (and lower the traffic we sent downstream) but also captures the traffic being sent (rather like
tcpdump). With debug, the
url diagnostic elements show an additional attribute:
id. This ID can be used to get the network dump for that call by using the logging entrypoint:
You can turn on this feature in the console by appending
debug=true to the console url, e.g.,
The new console takes this one step further and auto-links the IDs found in the diagnostics to the captured network dump:
So you can just click on an ID to see what happened without having to remember what the logging endpoint looked like:
The "diagnostics" element in the response can be invaluable in working out what YQL has done to satisfy a query (what network calls it made, getting log output from open data tables). However, it sometimes causes really long lines to be returned, which are hard to scan or read. Just select the wrap checkbox in the UI to make the results area force-wrap the contents it is displaying:
While we've got lots more in the works, we'd love to hear from you if there are specific features or bugs that you'd like to see prioritized.