pig tutorial - apache pig tutorial - Apache Pig - Load & Store Functions - pig latin - apache pig - pig hadoop
What is Load & Store Functions in Apache Pig ?
- The Load and Store functions in Apache Pig are used to determine how the data goes ad comes out of Pig.
- These functions are used with the load and store operators
S.no | Syntax | Function & Description |
---|---|---|
1 | A = LOAD ‘student’ USING PigStorage(‘\t’) AS (name: chararray, age:int, gpa: float); |
PigStorage()To load and store structured files. |
2 | A = LOAD ‘data’ USING TextLoader(); | TextLoader()To load unstructured data into Pig. |
3 | A = LOAD ‘data’ USING BinStorage(); | BinStorage()To load and store data into Pig using machine readable format. |
4 | A = load ‘myinput.gz’;store A into ‘myoutput.gz’; | Handling CompressionIn Pig Latin, we can load and store compressed data. |