如何将带有小数字段的镶木地板文件加载到 BigQuery 中?
How to load a parquet file with a dicimal field into BigQuery?
我们有一个名为 parq 的 table 存储为 parquet,并且在 parq 中有一个字段是 Decimal。
当我将 parq 加载到 BigQuery 中时,我收到一条消息:
"Parquet type 'FIXED_LEN_BYTE_ARRAY' (DECIMAL) for field 'field_name' is
not supported."
加载结果:
Waiting on bqjob_r70dd180dddb0942d_00000160bb2ff706_1 ... (1s) Current
status: DONE Error in query string: Error processing job
'project_id:bqjob_r70dd180dddb0942d_00000160bb2ff706_1': Parquet type
'FIXED_LEN_BYTE_ARRAY' (DECIMAL) for field 'field_name' is not supported.
命令:
bq load --source_format=PARQUET --time_partitioning_type=DAY "dataset.table171001" "gs://data.0.parq"
如何将 data.0.parq 等镶木地板文件加载到 Bigquery 中?
谢谢。
BigQuery 尚不支持 DECIMAL 类型。根据Google,Q1应该准备好了:https://issuetracker.google.com/issues/35906014
所以同时我猜你必须先将这个字段转换为 Float,然后再将其存储到 Parquet
我们有一个名为 parq 的 table 存储为 parquet,并且在 parq 中有一个字段是 Decimal。
当我将 parq 加载到 BigQuery 中时,我收到一条消息:
"Parquet type 'FIXED_LEN_BYTE_ARRAY' (DECIMAL) for field 'field_name' is not supported."
加载结果:
Waiting on bqjob_r70dd180dddb0942d_00000160bb2ff706_1 ... (1s) Current status: DONE Error in query string: Error processing job 'project_id:bqjob_r70dd180dddb0942d_00000160bb2ff706_1': Parquet type 'FIXED_LEN_BYTE_ARRAY' (DECIMAL) for field 'field_name' is not supported.
命令:
bq load --source_format=PARQUET --time_partitioning_type=DAY "dataset.table171001" "gs://data.0.parq"
如何将 data.0.parq 等镶木地板文件加载到 Bigquery 中?
谢谢。
BigQuery 尚不支持 DECIMAL 类型。根据Google,Q1应该准备好了:https://issuetracker.google.com/issues/35906014
所以同时我猜你必须先将这个字段转换为 Float,然后再将其存储到 Parquet