您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 youtube官網中文視頻數據集標注(Hive實戰之Youtube數據集)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-07-21 04:38:55【】6人已围观
简介下面的實戰都是基于數據清洗后的數據進行的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;
結果如下:
思路:
結果如下:
很赞哦!(45816)
相关文章
- 02 秦皇島網紅孵化基地老板(秦皇島網紅打卡景點)
- 02 福建省漳州市醫院買粉絲(福建省漳州市平和縣長樂鄉樂北村的代碼是多少)
- 01 網織紅細胞計數正常百分比高(血常規的正常值是多少啊?)
- 02 科沃斯 海外收入(掃地機器人成為懶人福音 科沃斯與石頭科技去年財報哪家強?)
- 02 秦皇島網紅孵化基地是干嘛的(秦皇島哪里有網紅套大鵝的)
- 02 福建福特貿易有限公司(剎車卡鉗的品牌有哪些)
- 02 福建飛世達貿易有限公司(誰在飛世達電子廠上班)
- 01 網絡訂閱源是什么(那個rss訂閱源是干什么用的)
- 01 網絡直播帶貨培訓總結(主播工作總結(精選6篇))
- 01 網絡帶貨前十名(網紅排行榜前十名大全(全國快手網紅前十名))
热门文章
站长推荐
02 禾木網紅打卡咖啡店(國內最美的24個旅行目的地,適合12月出發,有你想去的嗎?)
02 福建泉心拾億國際貿易有限公司(介紹世界名城)
01 網絡社交媒體討論深刻話題的案例(網絡社交媒體適合探討深刻話題嗎?)
01 網絡安全買粉絲推文(買粉絲推文怎么做)
02 福建師范大學海外教育學院官網(福建師范大學海外教育學院怎么樣?)
02 福建稅務買粉絲繳費入口(醫保繳費證明在哪里查詢)
02 科普小實驗買粉絲文案(講座海報模板-用文字處理軟件Word2010制作一張圖文并茂的學術講座宣傳海報,通常需要設置哪?)
02 穿越明朝海外建國的小說(假如你穿越到明朝中期,憑借自身知識,能否推動一個王朝的巨變,創造一個全新的歷史)