APACHE PIG ~ ALL WORKING EXAMPLES




Apache PIG Examples Set 1: 

In this examples set all the posts (links) are based on the following data tables structures:

Employees data table:


Department data table:


Posts (links):
  1. Apache Pig Exercises: 1. List All employee records
  2. Apache Pig Exercises: 2. List unique Job titles from EMP data
  3. Apache Pig Exercises: 3. List employee records in desc order of their emp nbr
  4. Apache Pig Exercises: 4. List employee records in desc order of their salaries
  5. Apache Pig Exercises: 5. List employees in asc order of dept nbr. & desc of job title
  6. Apache Pig Exercises: 6. List all employees with details of all ‘Managers’
  7. Apache Pig Exercises: 7. List all the unique job title in a descending order
  8. Apache Pig Exercises: 8. List all employee/s who joined before 1981
  9. Apache Pig Exercises: 9. List Empno, Ename, Sal, Daily Sal of all Employees in ascending order of AnnSal
  10. Apache Pig Exercises: 10. List Empno, Ename, Job, Hiredate, Experience of all Managers
  11. Apache Pig Exercises: 11. List Empno, Ename, Sal, Exp of all Employees working for Manager 7839
  12. Apache Pig Exercises: 12. List details of Employees whose Commission is more than their salary
  13. Apache Pig Exercises: 13. List Employees in ascending order of Designations
  14. Apache Pig Exercises: 14. List Employees along with their experience & daily salary is more than $100
  15. Apache Pig Exercises: 15. List Employees who are either ‘CLERK’ or ‘ANALYST’ in descending order
  16. Apache Pig Exercises: 16. List Employees who joined on 1-May-81, 31-Dec-81, 17-Dec-81, 19-Jan-81
  17. Apache Pig Exercises: 17. List Employees who are working for the deptno 10 or 20
  18. Apache Pig Exercises: 18. List Employees who are joined in the year 1981
  19. Apache Pig Exercises: 19. List Employees who are joined in the month of Dec 1981
  20. Apache Pig Exercises: 20. List Employees whose annul salary is ranging from 22000 and 45000
  21. Apache Pig Exercises: 21. List Employees those are having five characters in their names
  22. Apache Pig Exercises: 22. List total sales per departmental store wise and consumer wise
  23. Apache Pig Exercises: 23 How to handle Nulls in data (workaround)
  24. Apache Pig Exercises: 24 List Odd or Even Employee records based on empno
  25. Apache Pig Exercises: 25 List Employee names starting with ‘S’ and having five characters
  26. Apache Pig Exercises: 26 List Employee names with 3rd character as ‘R’ and Four characters length
  27. Apache Pig Exercises: 27 List Employee names starting with 'S' and ending 'H' with 5 characters length
  28. Apache Pig Exercises: 28 List all employees who were joined in January
  29. Apache Pig Exercises: 29 List employees who joined in a month of which second character is ‘a’
  30. Apache Pig Exercises: 30 List employees whose salary is 4 digit number ending with zero
  31. Apache Pig Exercises: 31 List employees whose names have a ‘LL’ characters together
  32. Apache Pig Exercises: 32 List employees who does not belong to deptno 20
  33. Apache Pig Exercises: 33 List all employees except ‘President’ & ‘Manager’ in asc order of salaries 
  34. Apache Pig Exercises: 34. List all employees who joined in Before or After 1981
  35. <More coming up soon...>

Apache PIG Examples Set 2:

  1. Apache Pig Eval Functions
  2. <More coming up soon...> 





3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. 1)List Employees in Descending order of Annual Salary
    2)List Employees whose Annual salary is greater than 200000
    3)List Employees who are neither ‘CLERK’ nor ‘ANALYST’
    4)List Employees whose Daily Salary Minimum

    answer these question...it will be helpful....and thank you for shareing

    ReplyDelete
  3. List all employees who are managers and have a salary ending with '5'

    ReplyDelete