Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkdm
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etl
tkdm
Commits
fd7275ec
Commit
fd7275ec
authored
Mar 16, 2017
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tkdm_output_user_cluster_app_day.sql
parent
ad7c821f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
tkdm_output_user_cluster_app_day.sql
tkdm_output_user_cluster_app_day.sql
+7
-5
No files found.
tkdm_output_user_cluster_app_day.sql
View file @
fd7275ec
...
@@ -4,15 +4,16 @@ set Mapred.min.split.size.per.rack=256000000
...
@@ -4,15 +4,16 @@ set Mapred.min.split.size.per.rack=256000000
set
hive
.
input
.
format
=
org
.
apache
.
hadoop
.
hive
.
ql
.
io
.
CombineHiveInputFormat
set
hive
.
input
.
format
=
org
.
apache
.
hadoop
.
hive
.
ql
.
io
.
CombineHiveInputFormat
set
hive
.
groupby
.
skewindata
=
true
;
set
hive
.
groupby
.
skewindata
=
true
;
insert
overwrite
table
tkdm
.
tkdm_output_user_cluster_app_day
partition
(
ds
=
'
2017-02-25
'
)
insert
overwrite
table
tkdm
.
tkdm_output_user_cluster_app_day
partition
(
ds
=
'
$ds
'
)
select
'
2017-02-25
'
as
dt
,
select
'
$ds
'
as
dt
,
appid
,
appid
,
category_id
,
category_id
,
isgame
,
isgame
,
count
(
1
)
as
num_user
count
(
if
(
cid
=-
1
,
1
,
null
))
as
num_user_def
,
count
(
if
(
cid
!=-
1
,
1
,
null
))
as
num_user_cam
from
tkdm
.
tkdm_data_active_detial_day
from
tkdm
.
tkdm_data_active_detial_day
where
ds
=
'
2017-02-25
'
where
ds
=
'
$ds
'
group
by
appid
,
category_id
,
isgame
group
by
appid
,
category_id
,
isgame
cluster
by
appid
,
category_id
,
isgame
cluster
by
appid
,
category_id
,
isgame
...
@@ -24,7 +25,8 @@ dt string,
...
@@ -24,7 +25,8 @@ dt string,
appid
int
,
appid
int
,
category_id
int
,
category_id
int
,
isgame
int
,
isgame
int
,
num_user
int
num_user_def
bigint
,
num_user_cam
bigint
)
)
PARTITIONED
BY
(
ds
string
)
PARTITIONED
BY
(
ds
string
)
ROW
FORMAT
DELIMITED
ROW
FORMAT
DELIMITED
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment