anchor.diff:  http://pig.apache.org/[Apache Pig] is a platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs.
   
   ____
  -It provides a high-level, powerful, _scripting_-like transformation language which gets compiled into {mr} jobs at runtime by the Pig 'compiler'. To simplify working with arbitrary data, Pig associates a 'schema' (or type information) with each data set for validation and performance. This in turn, breaks it down into 'discrete' data types that can be transformed through various operators or custom functions (or http://pig.apache.org/docs/r0.11.1/udf.html[UDF]s). Data can be loaded from and stored to various storages such
  -as the local file-system or HDFS, and with {eh} into {es} as well.
  +It provides a high-level, powerful, _scripting_-like transformation language which gets compiled into {mr} jobs at runtime by the Pig 'compiler'. To simplify working with arbitrary data, Pig associates a 'schema' (or type information) with each data set for validation and performance. This in turn, breaks it down into 'discrete' data types that can be transformed through various operators or custom functions (or http://pig.apache.org/docs/r0.11.1/udf.html[UDF]s). Data can be loaded from and stored to various storages such as the local file-system or HDFS, and with {eh} into {es} as well.
   
   === Installation
   
   In order to use {eh}, its jar needs to be in Pig's classpath. There are various ways of making that happen though typically the http://pig.apache.org/docs/r0.11.1/basic.html#register[REGISTER] command is used:
   
   ----
  -REGISTER elasticsearch-hadoop.jar;
  +REGISTER /path/elasticsearch-hadoop.jar;
   ----
   
   Note that the command expects a proper URI that can be found either on the local file-system or remotely. Typically it's best to use a distributed file-system (like HDFS or Amazon S3) and use that since the script might be executed
  
positive.code: 
  === Writing data to {es}
  
  
  === Reading data from {es}
negative.code: As an alternative, when using the command-line, one can register additional jars through the '-Dpig.additional.jars' option (that accepts an URI as well):
  
  ----
  pig -Dpig.additional.jars=/path/elasticsearch-hadoop.jar:<other.jars> script.pig
  ----
  
  or if the jars are on HDFS
  
  ----
  pig -Dpig.additional.jars=hdfs://<cluster-name>:<cluster-port>/<path>/elasticsearch-hadoop.jar:<other.jars> script.pig
  ----
  
  [[type-conversion-pig]]
  