Skip to main content
Sunny93
Bronze ⭐️⭐️⭐️
June 2, 2021
Solved

Why do I have "incompatible Parquet schema" error after changing a column type from double to string ?

File 'hdfs://xxx:8020/data/hive/warehouse/xxxx.db/test_bak/8743abe2968ecbe7-3f9c13700000000_2053286657_data.0.parq' has an incompatible Parquet schema for column 'xxxx.test_bak.ordered_revenue'. Column type: STRING, Parquet schema: optional double ordered_revenue [i:20 d:1 r:0]

 

I made this change in Hue.

Daming Xue
Gold ⭐️
June 4, 2021

Hello

 

The table column type must match the columnar file format of the Parquet file, else you will result in the error you got

 

One way if you prefer to use string instead of double for that data attribute, you can recreate the parquet file with the column type of string

1 reply

Daming Xue
Gold ⭐️
Gold ⭐️
June 4, 2021

Hello

 

The table column type must match the columnar file format of the Parquet file, else you will result in the error you got

 

One way if you prefer to use string instead of double for that data attribute, you can recreate the parquet file with the column type of string

Translate