[英]Arrays not supported in Bigquery Python API
對python Bigquery API的支持表明可以使用數組,但是,當從熊貓數據幀傳遞到bigquery時,會出現pyarrow結構問題。
唯一的辦法就是刪除列,然后對單獨的表使用JSON Normalize。
'''from google.cloud import bigquery
project = 'lake'
client = bigquery.Client(credentials=credentials, project=project)
dataset_ref = client.dataset('XXX')
table_ref = dataset_ref.table('RAW_XXX')
job_config = bigquery.LoadJobConfig()
job_config.autodetect = True
job_config.write_disposition = 'WRITE_TRUNCATE'
client.load_table_from_dataframe(appended_data, table_ref,job_config=job_config).result()'''
這是收到的錯誤。 NotImplementedError:結構
由於木地板序列化的工作方式,目前不支持此功能。
在客戶端庫的GitHub上創建了一個功能請求,以上傳包含數組的pandas DataFrame:
https://github.com/googleapis/google-cloud-python/issues/8544
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.