How to make a PIG UDF
by
Stuart Lodge
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
How to make a PIG UDF An Eclipse Beginners Guide…
Slide 2
Slide 2 text
The Java UDF ‘how to’ http://pig.apache.org/docs/r0.8.1/udf.html
Slide 3
Slide 3 text
Simple UDF Script -- myscript.pig REGISTER myudfs.jar; A = LOAD 'student_data' AS (name: chararray, age: int, gpa: float); B = FOREACH A GENERATE myudfs.UPPER(name); DUMP B;
Slide 4
Slide 4 text
The simple UDF
Slide 5
Slide 5 text
So… let’s write this UDF… 1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR
Slide 6
Slide 6 text
So… let’s write this UDF… 1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR
Slide 7
Slide 7 text
So… let’s write this UDF… 1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR
Slide 8
Slide 8 text
So… let’s write this UDF… 1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR
Slide 9
Slide 9 text
So… let’s write this UDF… 1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR
Slide 10
Slide 10 text
1. Start Eclipse 2. Create a new Java Project 3. Add pig.jar as an external Jar 4. Write our UDF class 5. Compile to a JAR So… let’s write this UDF…
Slide 11
Slide 11 text
That’s it! www.newgrove.com