使用Google Bigquery和Python批处理 [英] Batch with Google Bigquery and Python
本文介绍了使用Google Bigquery和Python批处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Google Bigquery Api在python中执行批量插入的最有效方法是什么.我试图在大型数据集上使用此代码执行流行(1 000 000 +),但插入它们需要一段时间.有没有更有效的方式在Python中插入大型数据集?
What's the most efficient way to perform a batch insert in python using Google Bigquery Api. I was tryng to perform a stream row using this code on a large dataset (1 000 000 +) but it's taking a while to insert them. Is there a more efficient way to insert a large dataset in Python?
- 该表已经存在,并且具有信息.
- 我有一个要插入的1 millon数据点的列表
- 我想用Python做到这一点,因为我会多次重用代码.
推荐答案
在您的情况下,我认为Streaming(插入所有API)没有道理
您宁可尝试加载作业
请参见文档
I don't think Streaming (Insert All API) makes sense in your case
You rather should try Load Job
See python code example in documentation
这篇关于使用Google Bigquery和Python批处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文