YQL控制台 - 没有找到表yahoo.finance.quotes的定义

own*_*ner 8 xml yahoo yahoo-api yahoo-finance

我目前正在学习如何通过YQL查询数据,并想知道表:yahoo.finance.quotes && yahoo.finance.historicaldata现在是否有效.

事实上,在/sf/ask/869233711/中提出了简单的查询:

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"
Run Code Online (Sandbox Code Playgroud)

返回:

<description>No definition found for Table yahoo.finance.quotes</description>
Run Code Online (Sandbox Code Playgroud)

但是,我可以在DATATABLES - > Show Community Tables中看到这些

谢谢

jos*_*nel 12

你需要做什么,它导入社区表.你可以做这样的事情

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

yql控制台中,只有在选中Show Community Table时才会显示这些

希望它会有所帮助

  • 查看您的YQL控制台URL.如果选中了Show Community Tables,它应该包含`&env = store:// datatables.org/alltableswithkeys`.如果是,则不需要在查询中键入`env`语句.如果没有,请添加它,因此您不必这样做. (2认同)