简体   繁体   English

BigQuery 加载镶木地板文件

[英]BigQuery load parquet file

I am trying to load a parquet type file into the bigquery table.我正在尝试将镶木地板类型的文件加载到 bigquery 表中。

However, the date type column in the yyyy-mm-dd format is recognized as a String, and the following error occurs.但是yyyy-mm-dd格式的日期类型列被识别为String,出现如下错误。

ERROR - Failed to execute task: 400 Provided Schema does not match Table my_prj.my_dataset.my_table. Field _P1 has changed type from DATE to STRING.

field_P1: 2022-10-05 field_P1: 2022-10-05

Is there any way to solve it?有什么办法解决吗?

The first solution that comes to my mind is to load the data using Pandas library in Python. This way, you can convert string to related date format and load the data directly to BigQuery.我想到的第一个解决方案是使用 Python 中的 Pandas 库加载数据。这样,您可以将字符串转换为相关的日期格式并将数据直接加载到 BigQuery。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Airflow:如何将 XLM 文件加载到 BigQuery? - Airflow: How to Load an XLM File to BigQuery? Bigquery parquet 文件处理列表<string>作为清单<int32>当传递空数组时</int32></string> - Bigquery parquet file treats list<string> as list<int32> when empty array is passed 从 GCS 获取文件并根据文件名模式加载到 bigquery - Get file from GCS and load to bigquery based on file name pattern BigQuery 传输与 BigQuery 加载 - BigQuery Transfer vs BigQuery load 如何从 gcs 存储桶中解压缩 tsv 文件并将其加载到 Bigquery - How to unzip and load tsv file into Bigquery from gcs bucket BIGQUERY csv 文件加载带有默认值的附加列 - BIGQUERY csv file load with an additional column with a default value 将文件从 Cloud Storage 加载到 BigQuery 到单个字符串列 - Load file from Cloud Storage to BigQuery to single string column 有没有一种简单/快速的方法可以将我的 Google Bucket 中的镶木地板文件加载到我的 Google Cloud Notebook 中? - Is there an easy / quick method to load a parquet file from my Google Bucket into my Google Cloud Notebook? 将 Pivot 表加载到 BigQuery - Load Pivot Table to BigQuery pandas dataframe 到 parquet 文件转换 - pandas dataframe to parquet file conversion
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM