Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Pig Wiki" for change 
notification.

The following page has been changed by OlgaN:
http://wiki.apache.org/pig/EmbeddedPig

------------------------------------------------------------------------------
+ [[Anchor(Embedding_Pig_In_Java_Programs)]]
- == Embedding Pig In Java Programs == 
+ == Embedding Pig In Java Programs ==
  
  Sometimes you want more control than Pig scripts can give you. If so, you can 
embed Pig Latin in Java (just like SQL can be embedded in programs using JDBC). 
  
@@ -12, +13 @@

   * To retrieve results, either call `PigServer.openIterator()` or 
`PigServer.store()`.
   * If you have user defined functions, register them by calling 
`PigServer.registerJar()`.
  
+ [[Anchor(Example)]]
  === Example ===
  
  Lets assume that I need to count the number of occurrences of each word in a 
document. Lets also assume that you have EvalFunction `Tokenize` that parses a 
line of text and returns all the words for that line. The function is located 
in `/mylocation/tokenize.jar`.

Reply via email to