tejas bharambe
tejas bharambe

Reputation: 15

How to integrate the java code written on local machine to Serde for hive query

I have written code (java) for the conversion of EBCDIC to ASCII on the local machine. And we are writing a serde for hive query which would provide the ability for Hive to read the EBCDIC file and convert it into ASCII file at run time. So that's why we are writing a SerDe. So how to integrate this code on. Local machine to SerDe.

Upvotes: 1

Views: 119

Answers (1)

mrsrinivas
mrsrinivas

Reputation: 35424

how to integrate this code on. Local machine to SerDe ?

Your class must implement org.apache.hadoop.hive.serde2.SerDe then you need to build the jar and move it cluster

  • Now include the JAR in ADD JAR <jar/location/in/cluster>
  • Use class SerDe class in TABLE CREATION or ALTERING like below

    ROW FORMAT SERDE 'classpath.of.implemented.SerDe.in.jar'

how-to-use-a-serde-in-apache-hive

Upvotes: 1

Related Questions