You have a file personal_data.txt in the HDFS directory with 100 records. You want to see only the first 5 records from the employee.txt file. How will you do this?
Answer / Vipul Negi
To view the first 5 records of an HDFS file using Pig, you would need to load the data into a Pig relation and then limit the number of rows displayed. Here's an example: `LOAD personal_data.txt INTO employee; LIMIT employee 5; DUMP employee;`
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a bag in Pig Latin?
Explain avrostorage function?
what is pig?
What are all stats classes in the java api package available?
What is atom in pig?
How do users interact with HDFS in Apache Pig ?
What is flatten in pig?
When we write a= load …, what does 'a' called?
Explain the LOAD keyword in Pig script?
Explain the architecture of Hadoop Pig?
What are some of the apache pig use cases you can think of?
What are the use cases of Apache 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)