首页 > 解决方案 > BigQuery 验证器故障

问题描述

我正在使用 BigQuery Web UI,有时验证器会显示绿色勾号以表明一切正常,但即使验证器已批准当前查询,查询也不会执行。其他时候,它似乎只是不断地思考它,而从不验证任何东西,然后我不知道如何继续。我非常依赖它,因为我是 SQL 新手,所以当它出现故障时我会卡住很多。

我试图删除表并重新创建它,但它只是给了我一个空白错误。截图如下。

这可能是由于美国服务器的延迟时间过长造成的吗?我刚刚测试了我的互联网速度,它看起来非常好,但我在南非。如果是这种情况,解决方法是什么?

错误只是说“无法运行查询”,如附加的屏幕截图所示。查询现在看起来像这样:

SELECT *,
CASE 
WHEN STORE = 'Somerset Mall' THEN 'Somerset'
WHEN STORE = 'Pavilion 8ta Flagship' THEN 'Pavilion'
WHEN STORE = 'N1 City' THEN 'N1'
WHEN STORE = 'GALLIERIA' THEN 'Galleria'
WHEN STORE = 'KWADUKUZA' THEN 'Stanger'
WHEN STORE = 'Çape Town' THEN 'ÇBD'
WHEN STORE = 'Walmer Park' THEN 'Walmer'
WHEN STORE =  'Canal Walk' THEN 'Canal Walk'
WHEN STORE = 'Cape Gate' THEN 'Çape Gate'
WHEN STORE = 'CAVENDISH' THEN 'Cavendish'
WHEN STORE = 'Kenilworth' THEN 'Kenilworth'
WHEN STORE =  'Table View' THEN 'Table View'
WHEN STORE = 'Old Mutual Pinelands' THEN 'Old Mutual'
WHEN STORE = 'Sea Point' THEN 'Sea Point'
WHEN STORE = 'Knysna' THEN 'Knysna'
WHEN STORE = 'George' THEN 'George'
WHEN STORE = 'Mossel Bay' THEN 'Mossel Bay'
WHEN STORE = 'Hermanus' THEN 'Hermanus'
WHEN STORE = 'Mitchells Plain' THEN 'Mitchells Plain'
WHEN STORE = 'Stellenbosch' THEN  'Stellenbosch'
WHEN STORE = 'Tygervalley' THEN 'Tygervalley'
WHEN STORE = 'Worcester' THEN 'Worcester'
WHEN STORE = 'Gateway' THEN 'Gateway'
WHEN STORE = 'Musgrave' THEN 'Musgrave'
WHEN STORE = 'Pietermaritzburg' THEN 'Pietermaritzburg'
WHEN STORE = 'Richards Bay' THEN 'Richards Bay' 
WHEN STORE = 'ETHEKWENI' THEN 'eThekwini'
WHEN STORE = 'Bluff' THEN 'Bluff' 
WHEN STORE = 'Chatsworth' THEN 'Chatsworth'
WHEN STORE = 'Ballito' THEN 'Ballito'
WHEN STORE = 'Hemmingways 8ta Flagship' THEN 'Hemmingways'
WHEN STORE = 'Baywest' THEN 'Baywest'
WHEN STORE = 'Greenacres' THEN 'Bridge'
WHEN STORE = 'Vincent Park' THEN 'Vincent Park'
WHEN STORE = 'Bloemfontein' THEN 'Bloemfontein'
WHEN STORE = 'Welkom' THEN 'Welkom'
WHEN STORE = 'Kimberley' THEN 'Kimberley' 
ELSE 'NEW QMAN STORE?'
END AS STORE_NAME
FROM `tester-253410.test1.Qman_data`

空白错误

验证器为绿色时查询失败的屏幕截图(左下)

查询开始截图

标签: google-bigquery

解决方案


我不认为删除表可以解决问题。

BigQuery UI 或您的浏览器似乎存在问题,请尝试清除缓存和 cookie

我的建议是尝试使用命令行工具通过Cloud Shell运行交互式和批处理查询作业,使用 CLI 设置--dry_run 标志(如果设置,请不要运行此作业。有效的查询将返回大部分为空的响应,其中包含一些处理统计信息,而无效查询将返回与非空运行相同的错误)来验证您的查询。

例如:

bq query \
--use_legacy_sql=false \
--dry_run \
'SELECT
   COUNTRY,
   AIRPORT,
   IATA
 FROM
   `project_id`.dataset.airports
 LIMIT
   1000'

返回:

Query successfully validated. Assuming the tables are not modified, running this query will process 122 bytes of data.

推荐阅读