【问题标题】:YQL Console - No definition found for Table yahoo.finance.quotesYQL 控制台 - 找不到表 yahoo.finance.quotes 的定义
【发布时间】:2026-01-14 14:50:01
【问题描述】:

我目前正在学习如何通过 YQL 查询数据,并且想知道现在这些表是否可用:yahoo.finance.quotes && yahoo.finance.historicaldata。 p>

事实上,https://*.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"

返回:

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

但是,我可以在 DATATABLES --> Show Community Tables

中看到这些表格

谢谢

【问题讨论】:

    标签: xml yahoo yahoo-api yahoo-finance


    【解决方案1】:

    你需要做的,就是导入社区表。你可以做这样的事情

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

    yql console 中,这些表格仅在您选中显示社区表格

    时才会出现

    希望对你有帮助

    【讨论】:

    • 我看到了 Show Community Table 框(见帖子),但我承认在 YQL 控制台中省略了以下语法 env 'store://datatables.org/alltableswithkeys'。谢谢,非常感谢您的帮助!
    • 不客气,伙计。如果您正在使用 python,请随时查看mYQL。祝你好运
    • 查看您的 YQL 控制台 URL。如果您选中 Show Community Tables,它应该包含 &amp;env=store://datatables.org/alltableswithkeys。如果是这样,则无需在查询中键入 env 语句。如果没有,请添加它,这样您就不必添加了。
    最近更新 更多