在流表上删除BigQuery [英] BigQuery delete on streaming table
本文介绍了在流表上删除BigQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
删除BigQuery流表上的行的最佳实践是什么? 我的想法是创建一个每日分区表,然后在分区前一天删除数据. 您认为可能有用吗?
What is the best practice to delete rows on BigQuery streaming table? My idea is to create a daily partitioned table and then delete data on the day before partion. Do you think might work?
推荐答案
另一种选择(避免手动删除)是使用分区到期时间
您可以为分区表指定分区到期时间(
Another option (to avoid manual deletion) is to use partition expiration
You can specify partition expiration for a partitioned table (timePartitioning.expirationMs
)
为分区保留存储空间的毫秒数.
Number of milliseconds for which to keep the storage for a partition.
注意:设置表的分区到期时间时,必须根据分区的日期计算分区到期时间.例如,如果分区的日期是2018年1月3日,并且您将分区的过期时间设置为5天,则该分区将在2018年1月8日到期,而不管其上次更新的时间是什么.
这篇关于在流表上删除BigQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文