Jump to content

Recommended Posts

Posted

Evarkanna pig scripting vacha . E roju assignment dead line undi and forgot about it . It is a simple query kani naku asalu idea ledu .

 

Evarkanna vaste please ping me

Posted
42 minutes ago, cloud said:

Evarkanna pig scripting vacha . E roju assignment dead line undi and forgot about it . It is a simple query kani naku asalu idea ledu .

 

Evarkanna vaste please ping me

hadoop lo pig aa?

Posted
43 minutes ago, cloud said:

Evarkanna pig scripting vacha . E roju assignment dead line undi and forgot about it . It is a simple query kani naku asalu idea ledu .

 

Evarkanna vaste please ping me

question ikada vey 

Posted

Use the ml-100k dataset, and Pig Latin in HDP: find the least rated one star movie (rating < 2.0). Most rated means, number of users rated that movie is the lowest and that movie is one star (rating <2.0).

Posted
Just now, cloud said:

Use the ml-100k dataset, and Pig Latin in HDP: find the least rated one star movie (rating < 2.0). Most rated means, number of users rated that movie is the lowest and that movie is one star (rating <2.0).

https://grouplens.org/datasets/movielens/100k/

ml 100k data set dentlo undi 

 

Sample code :

 

ratings = LOAD '/user/raj_ops/ml-100k/u.data' AS (userID:int, movieID:int, rating:int, ratingTime:int); moviesdata = LOAD '/user/raj_ops/ml-100k/u.item' USING PigStorage('|') AS (movieID:int, movieTitle:chararray, releaseDate:chararray); nameLookup = FOREACH moviesdata GENERATE movieID, movieTitle, ToUnixTime(ToDate(releaseDate, 'dd-MMM-yyyy')) AS releaseTime; ratingsByMovie = GROUP ratings BY movieID; avgRatings = FOREACH ratingsByMovie GENERATE group as movieID, AVG(ratings.rating) as avgRating; fiveStarMovies = FILTER avgRatings BY avgRating > 4.0; fiveStarsWithName = JOIN fiveStarMovies BY movieID, nameLookup BY movieID; fiveStarMovies = ORDER fiveStarsWithName BY nameLookup::releaseTime; DUMP fiveStarMovies;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...