Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python BigQuery表分区警告_Python_Google Cloud Platform_Google Bigquery - Fatal编程技术网

Python BigQuery表分区警告

Python BigQuery表分区警告,python,google-cloud-platform,google-bigquery,Python,Google Cloud Platform,Google Bigquery,最近,当我在使用Python客户机库创建BQ表时,试图提到表分区,下面一行 table_new.partitioning_type = 'DAY' 收到以下警告 UserWarning: This method will be deprecated in future versions. Please use Table.time_partitioning.type_ instead. UserWarning) 有人能解释一下吗?如果可能,请分享一段如何进一步指定分区类型的代码片段。当您

最近,当我在使用Python客户机库创建BQ表时,试图提到表分区,下面一行

table_new.partitioning_type = 'DAY'
收到以下警告

UserWarning: This method will be deprecated in future versions. Please use Table.time_partitioning.type_ instead.   UserWarning)

有人能解释一下吗?如果可能,请分享一段如何进一步指定分区类型的代码片段。

当您使用Python 3中的
表时,Python客户端库中会出现警告

您可以使用如下所示的代码:

这段代码适用于Python 2和Python 3

table_new.time_partitioning = bigquery.TimePartitioning(
        type_=bigquery.TimePartitioningType.DAY)