如何使用大查询中的命令行删除/截断表中的数据? [英] How to delete/truncate the data in the table using command line in big query?

查看:96
本文介绍了如何使用大查询中的命令行删除/截断表中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我尝试使用bq查询select query



它仅适用于Select语句

解决方案

请注意, BigQuery 真正擅长作为辅助数据库,用于对静态大数据执行快速分析查询,例如记录数据分析,日志和审计历史记录。



如果您需要定期更新数据,请强烈建议使用独立的主数据库,例如数据存储区以快速执行实体操作和更新。然后,您可以将数据从主数据库保存到辅助BigQuery数据库中以进一步分析。




因此,您必须告诉bq命令行使用完整的标准SQL - use_legacy_sql = false 代替原来的BigQuery默认传统SQL 访问数据操纵语言(DML)功能。

What is the command to execute DMLs like Insert,Update,Delete in Google Big Query?

I tried using bq query "select query"

It is working only for Select statements

解决方案

Note that BigQuery really excels at being a secondary database used for performing fast analytical queries on big data that is static, such as recorded data analysis, logs, and audit history.

If you instead require regular data updates, it is highly recommended to use a separate master database such as the Datastore to perform fast entity operations and updates. You would then persist your data from your master database to your secondary BigQuery database for further analysis.


Therefore, you must tell the bq commandline to use the full standard SQL --use_legacy_sql=false instead of the original BigQuery default legacy SQL to access the Data Manipulation Language (DML) functionality.

这篇关于如何使用大查询中的命令行删除/截断表中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆