0

YQL will not return weather information for Bratislava, Slovakia

I am using YQL to fetch weather information about certain cities, but it won't return any information about Bratislava, Slovakia [WOEID 818717], althrough http://weather.yahooapis.com/forecastrss?w=818717 works as expected. Even the error message states that "/forecastrss?w=818717" is an invalid input, but that's not true.
Try the query here:
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20location%3D818717&diagnostics=true
This is probably a bug in YQL. Can somebody please advise?
Thanks.




by
2 Replies
  • &quot;fixed&quot; this by using&nbsp;<br>select item.condition.text from weather.forecast where location in (<br> select id from weather.search where query=&quot;Bratislava, Slovakia&quot;<br>)<br>that I found on some blog. But why is it not working using WOEID?<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(TatianaK @ 2 Dec 2011 4:16 AM)</cite></div><blockquote class="quotemain">I am using YQL to fetch weather information about certain cities, but it won&#39;t return any information about Bratislava, Slovakia [WOEID 818717], althrough http://weather.yahooapis.com/forecastrss?w=818717 works as expected. Even the error message states that &quot;/forecastrss?w=818717&quot; is an invalid input, but that&#39;s not true.<br>Try the query here:<br>http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20location%3D818717&diagnostics=true<br>This is probably a bug in YQL. Can somebody please advise?<br>Thanks.<br><br><br><br><br></blockquote></div>
    0
  • Hi TatianaK,<br><br>The <em>weather.forecast</em> table uses the old <em>p=&lt;location&gt;</em> style of requests to the Yahoo! Weather RSS feed. &nbsp;This parameter must be a US zip code or a &quot;weather location ID&quot; as described in the old documentation [1].<br><br>An alternative is to make use of the contributed data tables, in particular&nbsp;<em>weather.woeid</em> (if you can&#39;t see this in the console, be sure to click &quot;Show Community Tables&quot;). An example query for your Bratislava WOEID looks like:<br><br>&nbsp; &nbsp;&nbsp;<span style="font-family:'Courier New';">select channel.item.condition.text from weather.woeid where w=818717;<br></span><br>(<a href="http://y.ahoo.it/nu+6C">Try this query in the YQL console</a>)<br><br><br>The above uses the newer <em>w=&lt;woeid&gt;</em> style of requests for the feed, as currently documented [2].<br><br>[1]&nbsp;http://web.archive.org/web/20091002014544/http://developer.yahoo.com/weather/<br>[2]&nbsp;http://developer.yahoo.com/weather/<br><br><br><div class="quote "><div class="quotetop ">QUOTE<cite>(TatianaK @ 2 Dec 2011 4:27 AM)</cite><blockquote class="quotemain">&quot;fixed&quot; this by using&nbsp;<br>select item.condition.text from weather.forecast where location in (<br> select id from weather.search where query=&quot;Bratislava, Slovakia&quot;<br>)<br>that I found on some blog. But why is it not working using WOEID?</blockquote></div></div>
    0

Recent Posts

in YQL