如何在不破坏 BigQuery Connector for Excel 的情况下运行标准 SQL 查询?

Sam*_*Sam 1 google-bigquery

我想运行以下查询。它是有效的并且可以在 Web ui 中运行

SELECT * FROM `option-optimizer.cme.3months_euro_dollar_future` 
where date = '2017-09-01'
Run Code Online (Sandbox Code Playgroud)

但当我通过 BigQuery Connector for Excel 运行它时它不起作用。它似乎无法识别标准 SQL 格式。这是我得到的错误。

Request failed: Error. Unable to execute query. 400 {
  "code": 400,
  "errors": [
    {
      "domain": "global",
      "location": "`option-optimizer:cme.3months_euro_dollar_future`",
      "locationType": "other",
      "message": "Invalid table name: `option-optimizer:cme.3months_euro_dollar_future`\n[Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].",
      "reason": "invalid"
    }
  ],
  "message": "Invalid table name: `option-optimizer:cme.3months_euro_dollar_future`\n[Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)]."
}
Run Code Online (Sandbox Code Playgroud)

除了上述错误之外,我认为日期过滤器也会损坏。

Mik*_*ant 5

要使用标准 SQL 运行查询,请在查询前添加以下行:

#standardSQL   
Run Code Online (Sandbox Code Playgroud)

例如:

#standardSQL   
SELECT * FROM `option-optimizer.cme.3months_euro_dollar_future` 
where date = '2017-09-01'
Run Code Online (Sandbox Code Playgroud)