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
b630b121
Commit
b630b121
authored
7 years ago
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete tkdm_output_active_std_week.sql
parent
b2783294
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
55 deletions
+0
-55
tkdm_output_active_std_week.sql
tkdm_output_active_std_week.sql
+0
-55
No files found.
tkdm_output_active_std_week.sql
deleted
100644 → 0
View file @
b2783294
add
jar
/
mnt1
/
testdata
/
udf
-
0
.
0
.
1
.
jar
;
CREATE
TEMPORARY
FUNCTION
bootstrapmedian
AS
'com.reyun.hive.udaf.BootStrap'
;
insert
overwrite
table
tkdm
.
tkdm_output_active_std_week
partition
(
ds
=
'2017-02-22'
)
select
/*+ mapjoin(y)*/
x
.
appid
,
x
.
category_id
,
x
.
isgame
,
nvl
(
y
.
avg_ins_rate
,
-
1
)
as
avg_ins_rate
,
nvl
(
y
.
approx_med_ins_rate
,
-
1
)
as
approx_med_ins_rate
,
nvl
(
y
.
bootstarp_med_ins_rate
,
-
1
)
as
bootstarp_med_ins_rate
from
(
select
category_id
,
isgame
,
round
(
avg
(
ins_rate
),
4
)
avg_ins_rate
,
round
(
percentile_approx
(
ins_rate
,
0
.
5
),
4
)
approx_med_ins_rate
,
round
(
bootstrapmedian
(
ins_rate
),
4
)
bootstarp_med_ins_rate
from
(
select
appid
,
category_id
,
isgame
,
ds
,
round
(
sum
(
num_install
)
/
sum
(
dupnum_click_all
),
4
)
as
ins_rate
from
tkdm
.
tkdm_data_active_detial_day
where
ds
between
'2017-02-22'
and
'2017-02-28'
group
by
appid
,
category_id
,
isgame
,
ds
)
as
tt
group
by
category_id
,
isgame
)
y
right
join
(
select
appid
,
category_id
,
isgame
from
tkio_v2
.
tkio_dp_app_info
where
ds
=
'2017-02-28'
)
as
x
on
x
.
category_id
=
y
.
category_id
and
x
.
isgame
=
y
.
isgame
create
EXTERNAL
table
tkdm_output_active_std_week
(
appid
string
,
category_id
int
,
isgame
int
,
avg_ins_rate
double
,
approx_med_ins_rate
double
,
bootstarp_med_ins_rate
double
)
PARTITIONED
BY
(
ds
string
)
ROW
FORMAT
DELIMITED
FIELDS
TERMINATED
BY
'
\t
'
location
's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_output_active_std_week'
;
This diff is collapsed.
Click to expand it.
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