How to write 'foreach' statement for map datatype in pig scripts?
Answer / Ruchi Verma
"To iterate over a map data type in Pig, use the FOREACH statement with the MAP function. The syntax is as follows: FOREACH map_name GENERATED_MAP AS (key: ktype, value: vtype) {n ...n}"
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain about the execution plans of a pig script?<Br> or<br> differentiate between the logical and physical plan of an apache pig script?
Explain about the execution pl of a pig script?<Br> or<br> differentiate between the logical and physical plan of an apache pig script?
What are all stats classes in the org.apache.pig.tools.pigstats package?
Can you join multiple fields in Apache
How does pig work?
How to write 'foreach' statement for map datatype in pig scripts?
What are the different modes in which PIG can run and explain those?
What is a relation in Pig?
What are complex data types in pig?
Explain hive udf function?
What are the components of Pig Execution Environment?
What are the different UDF’s in Pig?
Apache Hadoop (394)
MapReduce (354)
Apache Hive (345)
Apache Pig (225)
Apache Spark (991)
Apache HBase (164)
Apache Flume (95)
Apache Impala (72)
Apache Cassandra (392)
Apache Mahout (35)
Apache Sqoop (82)
Apache ZooKeeper (65)
Apache Ambari (93)
Apache HCatalog (34)
Apache HDFS Hadoop Distributed File System (214)
Apache Kafka (189)
Apache Avro (26)
Apache Presto (15)
Apache Tajo (26)
Hadoop General (407)