Apache Pig LOAD Operator
The Apache Pig LOAD operator is used to load the data from the file system.
- 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.
- Check the values written in the text files.
- 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.
- Let's check the corresponding schema.
Here, we got the desired output.