【问题标题】:How can I set expiration time for Big Query table?如何设置 Big Query 表的过期时间?
【发布时间】:2016-03-05 01:48:10
【问题描述】:

当我将查询加载或保存到表时, 是否可以使用 BQ 命令行工具设置表过期时间?

【问题讨论】:

    标签: google-bigquery


    【解决方案1】:

    使用命令行设置现有 BigQuery 表的过期时间:

    bq update --expiration 3600 mydataset.mytable
    

    本示例将 mydataset 中 mytable 的过期时间设置为从现在起 1 小时(3600 秒)。您还可以指定“0”以从表中删除现有的过期时间。

    另一种方法是在数据集上设置默认过期时间。您在此数据集中创建的每个新表都将根据设置具有过期时间。一个例子:

    bq update --default_table_expiration 3600 mydataset
    

    mydataset 中创建的每个新表只能使用一小时,然后自动过期。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-14
      • 2017-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多