8

I am currently learning how to query data via YQL, and wondering whether the tables : yahoo.finance.quotes && yahoo.finance.historicaldata nowadays work.

As a matter of fact, simple queries raised in https://stackoverflow.com/questions/12417624/:

select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT") 

select * from yahoo.finance.historicaldata where symbol in ("YHOO","AAPL","GOOG","MSFT") and startDate = "2012-09-13" and endDate = "2012-09-13"

return:

<description>No definition found for Table yahoo.finance.quotes</description>

However, I can see those tables available in DATATABLES --> Show Community Tables

Thanks

Community
  • 1
  • 1
owner
  • 723
  • 3
  • 9
  • 25

1 Answers1

12

What you need to do, it to import community table. You can do something like this

env 'store://datatables.org/alltableswithkeys'; select * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT") 

In the yql console, those tables only appear when you check Show Community Table

Hope it will help

josuebrunel
  • 1,071
  • 1
  • 10
  • 19
  • I've seen the **Show Community Table** box (see post), but I acknowledge to have omitted from the YQL Console the following syntax `env 'store://datatables.org/alltableswithkeys'`. Thanks, I do appreciate your help! – owner Jun 24 '15 at 13:06
  • You're welcome buddy. If you're working with python, don't hesitate to check [mYQL](https://github.com/josuebrunel/myql) out. Have a good one – josuebrunel Jun 25 '15 at 15:07
  • 2
    Look at your YQL Console URL. If you checked Show Community Tables, it should contain `&env=store://datatables.org/alltableswithkeys`. If it does, you don't need to type the `env` statement in your query. If not, add it, so you don't have to. – George Jul 04 '15 at 05:17