如何在没有到期日期的情况下在 BigQuery 上保留数据集 [英] How to keep data set on BigQuery without expiration date

查看:23
本文介绍了如何在没有到期日期的情况下在 BigQuery 上保留数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从沙盒模式升级了 Bigquery,并想删除数据集的到期日期.有人可以分享升级后我应该更改哪些设置以及如何更改吗?

I recently upgraded Bigquery from sandbox mode and would like to remove data set expiration date. Could anybody share which setting I should change after the upgrade and how to do it?

我已经更改了表格过期时间"到从不".

I've changed "Table Expiration" to "Never".

但是,在 Firebase 上,BigQuery 集成设置包含 Google Analytics 部分,并且仍然显示Data to live: 60days";我想知道如何更改它以及这是否会影响 BigQuery 上导入的数据过期.

However, on Firebase, BigQuery integration setting has Google Analytics part and it is still showing "Data to live: 60days" and I'm wondering how to change it and whether this is going to affect the imported data expiration on BigQuery.

推荐答案

这实际上与 Google Analytics 保留设置无关,而与 BigQuery 有关.您可以按照本指南将默认过期时间更新为从不:

This actually has nothing to do with the Google Analytics retention settings and has everything to do with BigQuery. You can follow this guide to update the default expiration time to never:

https://cloud.google.com/bigquery/docs/update-datasets#table-expiration

要更新数据集中新创建的表的默认到期时间,请输入带有 --default_table_expiration 标志的 bq update 命令.如果您要更新默认项目以外的项目中的数据集,请按以下格式将项目 ID 添加到数据集名称:project_id:dataset.

To update the default expiration time for newly created tables in a dataset, enter the bq update command with the --default_table_expiration flag. If you are updating a dataset in a project other than your default project, add the project ID to the dataset name in the following format: project_id:dataset.

bq update --default_table_expiration integer project_id:dataset

替换以下内容:

整数:新创建的表的默认生命周期,以秒为单位.最小值为 3600 秒(一小时).到期时间计算为当前 UTC 时间加上整数值.指定 0 到删除现有的过期时间.在数据集中创建的任何表在其创建时间后的整数秒内被删除.这个值是如果您没有在表时设置表到期,则应用已创建.

integer: the default lifetime, in seconds, for newly created tables. The minimum value is 3600 seconds (one hour). The expiration time evaluates to the current UTC time plus the integer value. Specify 0 to remove the existing expiration time. Any table created in the dataset is deleted integer seconds after its creation time. This value is applied if you do not set a table expiration when the table is created.

project_id:您的项目 ID.

project_id: your project ID.

dataset:您要更新的数据集的名称.

dataset: the name of the dataset that you're updating.

请记住,它只会影响向前创建的表,因此在 60 天后,此更新似乎不起作用,因为此更改之前的历史表将开始被删除.您也可以单独查看和更改每个表.

Keep in mind that it only affects tables created moving forward, so come 60 days, it will look like this update doesn't work since historical tables prior to this change will start to be deleted. You can go through and change each table individually as well.

这篇关于如何在没有到期日期的情况下在 BigQuery 上保留数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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