Python BigQuery表分区警告
最近,当我在使用Python客户机库创建BQ表时,试图提到表分区,下面一行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) 有人能解释一下吗?如果可能,请分享一段如何进一步指定分区类型的代码片段。当您
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)