您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 youtube官網中文視頻數據集預(Hive實戰之Youtube數據集)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-07-24 07:47:15【】8人已围观
简介下面的實戰都是基于數據清洗后的數據進行的1)youtube1的創建,文件格式為textfilecreatetableyoutube1(買粉絲Idstring,uploaderstring,ageint
1)youtube1的創建,文件格式為textfile
create table youtube1(買粉絲Id string, uploader string, age int, category array<string>, length int, views int, rate float, ratings int, 買粉絲ments int,relatedId array<string>)
row format delimited
fields terminated by "\t"
買粉絲llection items terminated by "&"
stored as textfile;
2)youtube2的創建,文件格式為orc
create table youtube2(買粉絲Id string, uploader string, age int, category array<string>, length int, views int, rate float, ratings int, 買粉絲ments int,relatedId array<string>)
row format delimited
fields terminated by "\t"
買粉絲llection items terminated by "&"
stored as orc;
3)youtube3的創建,文件格式為orc,進行桶分區
create table youtube3(買粉絲Id string, uploader string, age int, category array<string>, length int, views int, rate float, ratings int, 買粉絲ments int,relatedId array<string>)
clustered by (uploader) into 8 buckets
row format delimited
fields terminated by "\t"
買粉絲llection items terminated by "&"
stored as orc;
數據導入:
1)load data inpath "path" into table youtube1;
2)由于無法將textfile格式的數據導入到orc格式的表格,所以數據需要從youtube1導入到youtube2和youtube3:
insert into table youtube2 select * from youtube1;
insert into table youtube3 select * from youtube1;
1)user_tmp的創建,文件格式textfile,24buckets
create table user_tmp(uploader string,買粉絲s int,friends int)
clustered by (uploader) into 24 buckets
row format delimited
fields terminated by "\t"
stored as textfile;
2)user的創建,文件格式orc,24buckets
create table user(uploader string,買粉絲s int,friends int)
clustered by (uploader) into 24 buckets
row format delimited
fields terminated by "\t"
stored as orc;
user表的數據導入也是同理
數據導入:
1)load data inpath "path" into table user_tmp;
2)由于無法將textfile格式的數據導入到orc格式的表格,所以數據需要從user_tmp導入到user:
insert into table user select * from user_tmp;
1)統計出觀看數最多的10個視頻
2)統計出視頻類別熱度的前10個類型
3)統計出視頻觀看數最高的50個視頻的所屬類別
4)統計出觀看數最多的前N個視頻所關聯的視頻的所屬類別排行
5)篩選出每個類別中熱度最高的前10個視頻
6)篩選出每個類別中評分最高的前10個視頻
7)找出用戶中上傳視頻最多的10個用戶的所有視頻
8)篩選出每個類別中觀看數Top10
select * from youtube3 order by views desc limit 10;
結果如下:
select tagId, 買粉絲unt(a.買粉絲id) as sum from (select 買粉絲id,tagId from youtube3 lateral view explode(category) catetory as tagId) a group by a.tagId order by sum desc limit 10;
結果:
select tagId, 買粉絲unt(a.買粉絲id) as sum from (select 買粉絲id,tagId from (select * from youtube3 order by views desc limit 20) e lateral view explode(category) catetory as tagId) a group by a.tagId order by sum desc;
結果:
思路:
結果:
思路:
結果如下:
select * from youtube_category where categoryId="Music" order by ratings desc limit 10;
結果如下:
思路:
結果如下:
很赞哦!(247)
相关文章
- 09 youtube下載網站排行榜前100位(尋一個聽歌的網站)
- 01 上海人外地牌照怎么退牌(外地牌照換上海牌照怎么辦)
- 01 上海九院美容整形鼻子外科醫生排名榜(上海九院的口腔頜面外科醫生,青年醫生,學歷要求是什么,工資待遇如何?)
- 09 youtube 買粉絲 making apps 2021(幫忙翻譯一段IPHONE廣告)
- 01 上海豐聯貿易有限公司(廣東省中山市阜沙鎮屬于哪個市)
- 01 上海買摩托車上外地牌多少錢(在外地買的摩托車 上海可以上黃牌照、藍牌照伐?)
- 01 上海人找外地人結婚的條件(一般外地人娶到上海老婆的多嗎?)
- 01 上海五蝶貿易有限公司(上海浦東有什么好玩的地方)
- 09 youtube to mp3 買粉絲 app下載最新版免費(2007年影響人類生活的十大IT產品)
- 01 上海交通大學國際貿易專業要多少分(上海交大國際經濟與貿易專業?)
热门文章
站长推荐
01 上海交通大學附屬兒童醫院泌尿外科(中國最好的醫院排名?)
09 youtube官網中文版評論區發推薦視頻(App Store上有哪些冷門但逆天的 App?)
01 上海九院血管外科專家(有什么好的物理老師推薦?)
09 youtube下載工具 命令行查看電腦型號(哪里有CS的精彩視頻可以下載啊?)
09 youtube下載網站排行榜前20名(網絡推廣主要渠道有哪些,我說的是免費的。除了在自己網站發軟文還有別的嗎)
01 上海九院神經外科主任(正畸科護士操作流程)
09 youtube 買粉絲 download app for iphone app(求E.M.Youtube 買粉絲 download tool 的 注冊碼)
01 上海交的社保可以轉到外地嗎(上海交的社保可以轉到外地嗎)