UrbanPro
true

Learn Big Data from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Use of Piggybank and Registration in Pig

S
Sachin Patil
16/09/2018 0 0

What is a Piggybank?

Piggybank is a jar and its a collection of user contributed UDF’s that is released along with Pig. These are not included in the Pig JAR, so we have to register them manually in our script.

1. Download piggybank.jar

2. Copy this jar to /usr/lib/pig/lib
Terminal > sudo cp /home/cloudera/Desktop/piggybank.jar /usr/lib/pig/lib/

3. Register this jar to Pig:
Terminal > Pig
Grunt > Register piggybank.jar;

4.Now we are set to use UDF’s of Piggybank like below to process CSV file in Pig:

Grunt > tweets = load ‘/user/cloudera/tweets.csv’ using org.apache.pig.piggybank.storage.CSVExcelStorage() as (date: chararray,timing:chararray,Tweet_Text:chararray,Type:chararray,Media_Type:chararray,Hashtags:chararray,Tweet_Id:long,
Tweet_Url:chararray,twt_favourites:long,Retweets:long,col1:chararray,col2:chararray);

5. Dump its result:

Grunt> Dump tweets;

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

training #bigdatalab #online
# Fully equiped bigdata lab , for training and practice .Users can practice bigdata, datascience and machine learning technologies . User Can access this through internet , learn from anywhere. Kindly contact me for activation and subscription

What Are Olap, Molap, Rolap, Dolap, Holap?
1. OLAP: On-Line Analytical Processing: Designates a category of applications and technologies that allow the collection, storage, manipulation and reproduction of multidimensional data, with the goal...

SQL Join Types
There are four basic types of SQL joins: inner, left, right, and full. The easiest and most intuitive way to explain the difference between these four types is by using a Venn diagram, which shows all...

What Are Macros?
i. Macros are little programs that run within Excel and help automate common repetitive tasks. Macros are one of Excel's most powerful, yet underutilized feature. Using macros, you can save hours and boost...

Different Data File Formats in Big Data
Overview In this lesson I will be explaining the different kinds of Data File formats used in Big Data, These are widely used but unspoken of. Anyone aspiring to be a Data Engineer/Data Analyst/ML...
X

Looking for Big Data Classes?

The best tutors for Big Data Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Big Data with the Best Tutors

The best Tutors for Big Data Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more