Javatpoint Logo
Javatpoint Logo

Apache Pig LOAD Operator

The Apache Pig LOAD operator is used to load the data from the file system.

Syntax

Here,

  • LOAD is a relational operator.
  • 'info' is a file that is required to load. It contains any type of data.
  • USING is a keyword.
  • FUNCTION is a load function.
  • AS is a keyword.
  • SCHEMA is a schema of passing file, enclosed in parentheses.

Example of LOAD Operator

In this example, we load the text file data from the file system.

Steps to execute LOAD Operator

  • Create a text file in your local machine and provide some values to it.
Apache Pig LOAD Operator
  • Check the values written in the text files.
Apache Pig LOAD Operator
  • Upload the text files on HDFS in the specific directory.
  • Open the pig MapReduce run mode.
  • Load the file that contains the data.
  • Now, execute and verify the data.
Apache Pig LOAD Operator
  • Let's check the corresponding schema.
Apache Pig LOAD Operator

Here, we got the desired output.

Next TopicCROSS Operator





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA