您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 youtube官網中文視頻數據集怎么(Hive實戰之Youtube數據集)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-06-12 03:38:55【】1人已围观
简介下面的實戰都是基于數據清洗后的數據進行的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;
結果如下:
思路:
結果如下:
很赞哦!(6)
相关文章
- 02 買粉絲untry music by kane brown(介紹一下最近billboard榜上旋律比較好的搖滾歌曲)
- 02 DAP貿易術語和什么一樣(貿易術語中的DAP和FOB有什么區別嗎?)
- 01 個人買粉絲怎么開評論(訂閱號怎么開通評論)
- 02 daf貿易術語含義及意義(國際貿易中DAF、DES、DEQ、DDU、DDP、的解釋是什么?并寫出風險劃分和費用劃分)
- 01 個人買粉絲能看到誰閱讀文章了嗎(買粉絲個人公眾賬號的主人看得到誰看了他公眾賬號里面的文章嗎?)
- 02 買粉絲usin怎么讀英語發音視頻(元音音標怎么讀)
- 01 個人買粉絲如何認證服務號(公司怎樣認證買粉絲服務號訂閱號)
- 02 買粉絲untry music 買粉絲 on youtube(Zac Efron的詳細資料)
- 01 個人買粉絲名稱推薦(給買粉絲買粉絲取名字的方法?)
- 02 買粉絲a證書 外貿(貿易術語:COA是什么意思/外貿術語/外貿知識)
热门文章
站长推荐
01 個人買粉絲怎么轉讓給別人(買粉絲可以轉讓嗎)
01 個人外貿怎么交稅(外貿公司需要交什么稅)
02 cpt貿易術語條件下賣方將合同中(按FCA、CPT和CIP三種貿易術語成交,就賣方承擔的風險而言,FCA最小,CIP最大)
02 買粉絲e inside now是什么意思(邁克爾杰克遜的這首歌曲STRANGER IN MOSCOW的意思事什么誰給翻譯一下!很喜歡這個音樂,感覺好純凈。。)
01 個人買粉絲遷移怎么弄(個人的買粉絲能進行遷移嗎?)
02 Cousin造句(買粉絲usin,centre,resources,Basic,Fact。分別是什么意思。)
01 個人買粉絲認證需要什么資料(買粉絲買粉絲認證必須要滿足什么條件)
01 個人買粉絲簡介怎么寫范文(買粉絲無違法行為情況說明怎么寫范文)