Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


You have a file employee.txt in the hdfs directory with 100 records. You want to see only the first 10 records from the employee.txt file. How will you do this?



You have a file employee.txt in the hdfs directory with 100 records. You want to see only the first ..

Answer / Akshaya Kumar Singh

In Apache Pig, to view the first 10 records of a file, you can use the HEAD operator.nn`data = LOAD 'hdfs://path/to/employee.txt' AS (col1: chararray, col2: int, col3: float);ndata_head = HEAD data 10;nDUMP data_head;`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache Pig Interview Questions

What are the debugging tools used for Apache Pig scripts?

1 Answers  


What is a bag in Pig Latin?

1 Answers  


What are the different modes available in Pig?

1 Answers  


What is the function of UNION and SPLIT operators? Give examples?

0 Answers  


What is the use of BloomMapFile?

1 Answers  


How does pig work?

1 Answers  


Why there is need of pig language?

1 Answers  


What is atom in pig?

1 Answers  


is it posible to join multiple fields in pig scripts?

1 Answers  


How Apache Pig deals with the schema and schema-less data?

1 Answers  


What are the different execution modes available in Pig?

1 Answers  


How do you run pig scripts on kerberos secured cluster?

1 Answers  


Categories