[Solved-1 Solution] How to get the value for a variable key from a pig map ?
What is pigmap ?
- A map in Pig is a chararray to data element mapping, where that element can be any Pig type, including a complex type.
- The chararray is called a key and is used as an index to find the element, referred to as the value.
Problem :
How to get the value for a variable key from a pig map ?
Solution 1:
- Its not possible to do that in Pig. The key has to be static value.
Example:
- If the key set size of the above program is not too big.we can use the below one.
Learn Apache pig - Apache pig tutorial - Pig value chain map - Apache pig examples - Apache pig programs