YQL Console - No definition found for Table yahoo.finance.quotes
Asked Answered
N

1

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

Norwood answered 23/6, 2015 at 21:51 Comment(0)
G
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

Geminius answered 24/6, 2015 at 11:32 Comment(3)
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!Norwood
You're welcome buddy. If you're working with python, don't hesitate to check mYQL out. Have a good oneGeminius
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.Ranice

© 2022 - 2024 — McMap. All rights reserved.