You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

BigQuery UI验证器误报DROP MODEL错误 无法创建计划查询

BigQuery Scheduled Query: "training options cannot be empty" Error When Dropping ML Model

Issue Overview

When trying to set up a scheduled query to delete a BigQuery ML model, I ran into an unexpected validation error. The DDL statement recommended in the official docs:

DROP MODEL IF EXISTS `my_data.sample_model`

was flagged by the BigQuery UI validator with the error "training options cannot be empty". Even though running the statement directly works perfectly (successfully deleting {project-name}:my_data.sample_model), the validation failure blocks scheduling the query with the message "Cannot schedule invalid queries".

Update (March 25, 2021)

This bug has been fixed and is no longer present.

Root Cause

This appears to be a bug in the BigQuery UI's validation logic. The validator incorrectly treats the DROP MODEL statement as a model creation/training command that requires training configuration, leading to an irrelevant check for empty training options.

Workarounds

Two reliable workarounds exist to bypass this validation error:

  • Wrap the DROP MODEL statement with EXECUTE IMMEDIATE to avoid the faulty validation check:
    EXECUTE IMMEDIATE "DROP MODEL IF EXISTS `my_data.sample_model`"
    
  • Since BigQuery ML models are treated as specialized table resources, you can use the DROP TABLE statement instead:
    DROP TABLE IF EXISTS `my_data.sample_model`
    

I've also submitted a ticket about this issue to the Google Issue Tracker.

内容的提问来源于stack exchange,提问作者Nelly Mincheva

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 06:12:37