How to preserve case of json key inside glue table which use serde?

368 views Asked by At

I have created a glue table which converts the the json to parquet files .In one of the column which is defined as Map<String,String> having a nested json .I see the nested json key is getting converted to lowercase always irrespective of input .

For example :

 "payload": {
          "cpr_Rate": "10",
          "type":"cpr"
        }

When I read the parquet file I see cpr_Rate gets converted to cpr_rate all lower case .I am using org.openx.data.jsonserde.JsonSerDe. I tried using case.insensitive" = "FALSE" property too but it did not work either .I am open to change any other type of serde too if that preserve the case of my input .Thanks in advance

1

There are 1 answers

0
zhangfangkai On

you can use org.apache.hive.hcatalog.data.JsonSerDe replace org.openx.data.jsonserde.JsonSerDe