您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 youtube官網打不開如何清除緩存數據是什么數據集(Hive實戰之Youtube數據集)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-05-15 03:29:49【】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;
結果如下:
思路:
結果如下:
很赞哦!(3644)
相关文章
- 01 中國古代對外貿易發展趨勢(說說我國古代對外政策的趨勢)
- 01 中國號碼可以注冊tiktok么(tiktok賬號中國怎么注冊)
- 01 youtube apk download app(手機文件哪些可以刪)
- 01 y2mate youtube to mp3 downloader 買粉絲nverter flvto(免費下載歌曲軟件 全免費)
- 01 youtube android 買粉絲 download manager下載速度最快(我有一個視頻的鏈接,請問如何把這個鏈接轉化成視頻下載到電腦上啊?)
- 01 中國醫大四院買粉絲(明明在住院,為什么哈醫大四院買粉絲怎么顯示沒有住院記錄呢?)
- 01 中國賣家怎么在tiktok上開店發貨(tiktok開店流程及費用)
- 01 youtube app desktop app service無法(background intelligent transfer service 關閉這項服務有什么弊端?)
- 01 中國古代對外貿易(中國古代西漢,隋唐,兩宋,元朝對外貿易發展概況。)
- 01 中國和哪些國家貿易最多(中國是多少國家的最大貿易伙伴)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款的名片
职业:程序员,设计师
现居:内蒙古呼伦贝尔额尔古纳市
工作室:小组
Email:[email protected]
热门文章
站长推荐
01 中國醫療保險買粉絲的二維碼(買粉絲二維碼在哪里找出來)
01 you are good friends什么意思(We're good friends!Yeah什么意思 中文翻譯)
01 中國古代社會對外貿易政策演變及其原因(如何看待中國古代經濟發展的歷史特點?)
01 中國各省外貿排名(中國各省gdp排行榜2021年)
01 youtube a mp3 320kbps download youtube(什么是RMVB)
01 中國和哪些國家貿易順差(中國對那些國家的貿易是順差哪些是逆差)
01 中國古代貿易商品(中國古代對外貿易的主要的兩種商品是)
01 買粉絲.youtube.買粉絲 login to youtube(互聯網發展簡史)