Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to make a pig udf

2,622 views

Published on

How to make a pig udf
Especially for C# coders

Published in: Technology
  • Be the first to comment

  • Be the first to like this

How to make a pig udf

  1. 1. How to make a PIG UDF An Eclipse Beginners Guide…
  2. 2. The Java UDF ‘how to’http://pig.apache.org/docs/r0.8.1/udf.html
  3. 3. Simple UDF Script-- myscript.pigREGISTER myudfs.jar;A = LOAD student_data AS (name: chararray, age: int, gpa: float);B = FOREACH A GENERATE myudfs.UPPER(name);DUMP B;
  4. 4. The simple UDF
  5. 5. So… let’s write this UDF…1. Start Eclipse2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  6. 6. So… let’s write this UDF…1. Start Eclipse2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  7. 7. So… let’s write this UDF…1. Start Eclipse2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  8. 8. So… let’s write this UDF…1. Start Eclipse2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  9. 9. So… let’s write this UDF…1. Start Eclipse2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  10. 10. 1. Start Eclipse write this UDF… So… let’s2. Create a new Java Project3. Add pig.jar as an external Jar4. Write our UDF class5. Compile to a JAR
  11. 11. That’s it!www.newgrove.com

×