您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 youtube官網中文視頻數據集標注(Hive實戰之Youtube數據集)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-06-23 03:33: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;
結果如下:
思路:
結果如下:
很赞哦!(51)
相关文章
- 05 youtube下載官網蘋果錄屏沒保存(電腦不用軟件怎么錄屏)
- 05 youtube下載官網手機登錄不了microsoft(蘋果筆記本電腦怎么下載東西)
- facebook加速器安卓(安卓手機怎么登陸臉書) - 副本
- 05 youtube下載官網手機登錄界面設計圖片(PS軟件各個版本區別大嗎?哪個版本最適合新手?)
- 05 youtube下載器apple music美區怎么(哪個音樂軟件音質最好?)
- 05 youtube下載安裝教程及算你(如何在手機上下載網頁中的視頻?)
- 05 youtube下載器推薦免費單機電腦游戲(電腦上錄游戲視頻用哪個軟件好?)
- 05 youtube下載器apple id服務器暫(我啥我在手機上下載游戲玩的時候說此應用程序沒有授權在你的ANDROID設備上使用)
- 05 youtube下載安裝地址修改引用地址包括哪(應用提交 App Store 上架被拒的原因都有哪些)
- 05 youtube下載官網軟件驅動下載很慢怎么(有沒有 不用ITUNES 直接刷機的辦法啊)
热门文章
站长推荐
05 youtube下載安裝地址設置在車后(電腦的wenti)
facebook刪除賬號頁面(facebook公共主頁里的聯系人怎么刪除) - 副本
facebook加入的小組在哪里(facebook怎么看自己在小組內發的帖子) - 副本
facebook加好友有限制嗎(facebook不是好友發送消息對方能收到嗎)
05 youtube下載官網地址進行綁定操作(2022最新版從0-1運營TikTok的保姆級教程)
05 youtube下載安裝失敗錯誤代碼為(跪求GoogleIntel公司的相關資料~~~)
05 youtube下載器apple music美區怎么(哪個音樂軟件音質最好?)
facebook刪除賬號能重新注冊嗎(注冊facebook時,一直顯示網絡錯誤,怎么辦?)