当我尝试使用 BigQuery UI 进行查询时,例如:
SELECT * FROM `mytable.mydataset.table`;
效果很好。
当我使用 API 尝试相同的操作时,请求如下:
{
"query": "SELECT * FROM `mytable.mydataset.table`"
}
我收到错误:
Invalid project ID '`mytable`'. Project IDs must contain 6-63 lowercase letters, digits, or dashes. Some project IDs also include domain name separated by a colon. IDs must start with a letter and may not end with a dash.
为什么?我该如何解决它?
将其更改为不使用旧版 SQL 有效:
{
"query": "SELECT * FROM `mytable.mydataset.table`",
"useLegacySql": false
}