In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the example analysis of the flow process table in hive, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.
Time platform cate1 cate2 cate3 cate4 cate5 lastcateId area1 area2 area3 lastareaId pagetype chlName source1 source2
Indicators:
`pv` int (11) DEFAULT NULL COMMENT 'pv'
`uv` int (11) DEFAULT NULL COMMENT 'uv'
`newuv` int (11) DEFAULT NULL COMMENT 'new visitors'
`visit`int (11) DEFAULT NULL COMMENT 'visits'
`newvisit` int (11) DEFAULT NULL COMMENT 'new visits'
`avgpage`aPCge browsing page number'
`avgtime` float DEFAULT NULL COMMENT 'average stay time'
`jumpin` int (11) DEFAULT NULL COMMENT 'number of jumps'
`jumpout` int (11) DEFAULT NULL COMMENT 'number of jumps'
`outrate`float DEFAULT NULL COMMENT 'bounce rate
Create EXTERNAL table IF NOT EXISTS ext_pctrack_is (
Cate1 string COMMENT'4'
Cate2 string COMMENT '29'
Cate3 string COMMENT '14052'
Cate4 string COMMENT '14052'
Cate5 string COMMENT '14052'
LastcateId string COMMENT '14052'
Area1 string COMMENT '102'
Area2 string COMMENT'-'
Area3 string COMMENT'-'
LastareaId string COMMENT '14052'
Pagetype string COMMENT '14052'
ChlName string COMMENT '14052'
Source string COMMENT '14052'
Pv bigint
Uv bigint
Newuv bigint
Visit bigint
Newvisit bigint
Avgpage DOUBLE
Avgtime DOUBLE
Jumpin bigint
Jumpout bigint
Outrate DOUBLE
)
PARTITIONED BY (statDate STRING)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY'\ t'
COLLECTION ITEMS TERMINATED BY'\ 002'
MAP KEYS TERMINATED BY'\ 003'
LINES TERMINATED BY'\ n'
STORED AS TEXTFILE
LOCATION'/ dsap/middata/shx/IntegrativeStatisticsPC'
ALTER TABLE ext_pctrack_is ADD PARTITION (statDate='20140922') LOCATION'/ dsap/middata/shx/IntegrativeStatisticsPC/20140922'
Set hive.cli.print.header=true
Select * from ext_pctrack_is where statdate='20140922' limit 10
ALTER TABLE ext_pctrack_is ADD PARTITION (statDate='20141010') LOCATION'/ shx/IntegrativeStatisticsPC/20141010'
-- query
Select * from ext_pctrack_is
Where
Statdate='20141022' and
Cate1='A' and
Cate2='A' and
Cate3='A' and
Cate4='A' and
Cate5='A' and
Area1=' Beijing 'and
Area2='A' and
Area3='A' and
Pagetype ='A 'and
Chlname ='A 'and
Source1='A' and
Source2='A'
-- query secondary sources
Hadoop fs-cat / shx/IntegrativeStatisticsPC/20141021/par* | awk-F "\ t" {if ($24 million = "" & & $13 = "Advertising campaign" & & $14 million = "other" & & $14 million = "A") print $0;}'| more
Hadoop fs-cat / dsap/middata/shx/IntegrativeStatisticsPC/20141021/par* | awk-F "\ t"'{print $13 "\ t" $14}'| more
Thank you for reading this article carefully. I hope the article "sample Analysis of flow process Table in hive" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.