Compile and add Hive UDF via ADD JAR in HDInsight on Azure

To compile a Hive UDF and if you have the Hadoop source code, the right way to do this is to use maven with the Hive repository so you can compile your JAR using the exact version of the source code / jars that you are working against.  For more information on how to use maven, check out: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html But in situations where you do not have access to the source code, but you have all the necessary jars (like the jars within the lib folder) you can workaround this by manually compiling the Hive UDFs.  To do this, let’s…

Rate this:

Add Built-In Hive UDFs on HDInsight Azure

In the last few weeks, I have had a number of customers ping me about how to utilize various Hive UDFs.  The first ask was how to use some of the UDFs that are already built into Hive.  For example, if you wanted a generated row sequence number (i.e. an IDENTITY column), you can use the Hive UDF UDFRowSequence.  This UDF is already built and included in the hive-contrib-0.9.0.jar that is not already loaded in the distributed cache (run list jars from the Hive CLI to verify).  Below is a quick code snippet that allows you to run the generated…

Rate this: