0

I have a pig script outputting a map[float] using PigStorage. When I try to read this output in hive, the square brackets surrounding the map are not read properly (or maybe an extra pair of brackets is added when reading it as a map in hive).

The opening bracket is read as part of the first string, i.e., "[string1" instead of "string1," and the closing bracket is read as part of the final float value (making the float invalid or null in hive). Are there any proper solutions for this? Thank you.

I tried 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' WITH SERDEPROPERTIES with various parameters but couldn't resolve the issue.

dtolnay
  • 9,621
  • 5
  • 41
  • 62
beygel
  • 11
  • 3
  • You should use HCatalog to write to a Hive table. Also, not all versions of Hive support maps, I think, so what are you using? – OneCricketeer Jan 29 '23 at 07:29

0 Answers0