【问题标题】:Big Query table object attributes are emptyBig Query 表对象属性为空
【发布时间】:2017-08-30 07:48:18
【问题描述】:

我想使用 Python 检查 BigQuery 表的最后修改日期。为此,我使用了 Google Cloud BigQuery 客户端 (https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/bigquery)。

执行以下代码时,表属性'modified'为空。

google-cloud-bigquery==0.24.0

使用的代码:

from google.cloud import bigquery

client = bigquery.Client()
dataset = client.dataset(my_dataset)
table = dataset.table(my_table)

print table.modified

【问题讨论】:

    标签: python google-bigquery


    【解决方案1】:

    经过一番研究,我发现了这个问题https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2756

    它描述了我遇到的完全相同的问题,但使用了另一个表属性。

    这似乎是 python 客户端中的一个错误。在 GitHub 问题的某个时刻,@ahogit 给出了一个临时解决方案。您只需要在访问表属性之前运行table.reload()

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-08
      • 1970-01-01
      • 2021-02-01
      • 2016-05-04
      • 1970-01-01
      • 1970-01-01
      • 2022-01-12
      相关资源
      最近更新 更多