Analyzing Aadhar Cards Data using Apache Pig - and Find out the total number of cards approved by States, Find out the total number of cards rejected by states, Find out the total number of cards approved by cities, and Find out the total number of cards rejected by cities.
- Find out the total number of cards approved by States.
- Find out the total number of cards rejected by states.
- Find out the total number of cards approved by cities.
- Find out the total number of cards rejected by cities.
The data set consists of the following fields.
1.State: This field consists of the state names from all over India 2.City: This field consists of city names in all states 3.Approved: This fields consists of the total count of approved cards in numbers 4.Rejected: This field consists of the total count of rejected cards in numbers
First we need to create a directory in HDFS. Creating a directory called pig in hdfs.
$bin/hdfs dfs -put [Input File Local Path...] /[Input File Destination file in HDFS]
In this use case we are finding the total number of cards approved by States.
1.Load Aadhar details 2.group them by states 3.summing up the values of cards approved by each state 4.Finally storing the output into HDFS.
Below is the sample output screen for usecase1
In this use case we are finding total number of cards rejected by each states.
1.Load Aadhar details 2.group them by states 3.summing up the values of cards rejected by each state 4.Finally storing the output into HDFS.
In this use case we are finding the total number of cards approved by cities.
1.Load Aadhar details 2.group them by states 3.summing up the values of cards approved by cities 4.Finally storing the output into HDFS.
In this use case we are finding the total number of cards rejected by cities.
1.Load Aadhar details 2.Group them by states 3.Summing up the values of cards rejected by cities 4.Finally storing the output into HDFS.