Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
87259bba
Commit
87259bba
authored
Sep 23, 2020
by
yindanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add icon_function_day report codes
parent
6270a8a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
icon_function_day.sql
pm/icon_function_day/etl/icon_function_day.sql
+5
-4
No files found.
pm/icon_function_day/etl/icon_function_day.sql
View file @
87259bba
...
...
@@ -9,6 +9,7 @@ SET role admin;
ADD
JAR
hdfs
:
///
user
/
hive
/
share
/
lib
/
udf
/
hive
-
udf
-
1
.
0
-
SNAPSHOT
.
jar
;
CREATE
TEMPORARY
FUNCTION
convup
AS
'com.gmei.hive.common.udf.UDFConvUpgrade'
;
CREATE
TEMPORARY
FUNCTION
setencryption
AS
'com.gmei.hive.common.udf.UDFStringSetEncryption'
;
INSERT
OVERWRITE
TABLE
pm
.
tl_pm_icon_function_d
PARTITION
(
PARTITION_DAY
=
${
partition_day
}
)
...
...
@@ -75,10 +76,10 @@ from
,
'TF-toufang5'
,
'tf-toufang1'
,
'tf-toufang2'
,
'tf-toufang3'
,
'tf-toufang4'
,
'tf-toufang5'
,
'benzhan'
,
'promotion_aso100'
,
'promotion_qianka'
,
'promotion_xiaoyu'
,
'promotion_dianru'
,
'promotion_malioaso'
,
'promotion_malioaso-shequ'
,
'promotion_shike'
,
'promotion_julang_jl03'
,
'promotion_zuimei'
,
''
,
'unknown'
)
then
'积分墙'
ELSE
'医美'
END
as
channel_type
,
case
when
(
partition_date
<=
'20200916'
AND
substr
(
convup
(
s
ha1
(
m
.
device_id
),
16
,
10
),
-
2
,
2
)
%
20
in
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
))
or
(
partition_date
>=
'20200917'
AND
partition_date
<=
'20200922'
AND
substr
(
convup
(
s
ha1
(
m
.
device_id
),
16
,
10
),
-
2
,
2
)
%
20
in
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
))
then
'灰度'
when
(
partition_date
=
'20200916'
AND
substr
(
convup
(
s
ha1
(
m
.
device_id
),
16
,
10
),
-
2
,
2
)
%
20
in
(
10
,
11
,
12
,
13
,
14
,
15
))
or
(
partition_date
=
'20200922'
AND
substr
(
convup
(
s
ha1
(
m
.
device_id
),
16
,
10
),
-
2
,
2
)
%
20
in
(
16
,
17
,
18
,
19
))
then
'其他'
,
case
when
(
partition_date
<=
'20200916'
AND
substr
(
convup
(
s
etencryption
(
m
.
device_id
,
'sha-1'
),
16
,
10
),
-
2
,
2
)
%
20
in
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
))
or
(
partition_date
>=
'20200917'
AND
partition_date
<=
'20200922'
AND
substr
(
convup
(
s
etencryption
(
m
.
device_id
,
'sha-1'
),
16
,
10
),
-
2
,
2
)
%
20
in
(
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
))
then
'灰度'
when
(
partition_date
=
'20200916'
AND
substr
(
convup
(
s
etencryption
(
m
.
device_id
,
'sha-1'
),
16
,
10
),
-
2
,
2
)
%
20
in
(
10
,
11
,
12
,
13
,
14
,
15
))
or
(
partition_date
=
'20200922'
AND
substr
(
convup
(
s
etencryption
(
m
.
device_id
,
'sha-1'
),
16
,
10
),
-
2
,
2
)
%
20
in
(
16
,
17
,
18
,
19
))
then
'其他'
WHEN
partition_date
>=
'20200923'
then
'灰度全量'
else
'非灰'
end
as
grey_type
FROM
online
.
ml_device_day_active_status
m
LEFT
JOIN
...
...
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