Ya Ko
Ya Ko

Reputation: 529

Using JAR from HUE

I have jar file that get IP as param and return csv:

Country,Organization

I.e myjar.jar 8.8.8.8 will return

Country,Organization
United States,Google

I have Hadoop table with IP address, I want to call to my JAR with IP from my table and to get the results from my JAR, Is is possible?

I'm using HUE with Hive/Impala editor and did:

add jar HDFS:///PATH/TO/MY/JAR.JAR

And now I don't know how to use my jar

Any suggestions?

Upvotes: 0

Views: 403

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 192013

You need to say which class within the JAR to use by defining a function.

CREATE TEMPORARY FUNCTION name AS 'com.example.full.class.name'

Then use name() as a SQL function

Upvotes: 1

Related Questions