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
ccab5aca
Commit
ccab5aca
authored
Nov 12, 2020
by
yindanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add yeji_day report codes
parent
5cd3bd9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
22 deletions
+1
-22
create_yeji_day.sql
pm/yeji_day/etl/create_yeji_day.sql
+1
-1
yeji_day.sql
pm/yeji_day/etl/yeji_day.sql
+0
-21
No files found.
pm/yeji_day/etl/create_yeji_day.sql
View file @
ccab5aca
...
...
@@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS pm.tl_pm_yeji_d
cpc_chongzhi_amount
BIGINT
comment
'{"chs_name":"cpc充值消耗","description":"","etl":"","value":"","remark":""}'
,
cpc_click_num
BIGINT
comment
'{"chs_name":"cpc点击数","description":"","etl":"","value":"","remark":""}'
,
liulan_amount
BIGINT
comment
'{"chs_name":"浏览收入","description":"","etl":"","value":"","remark":""}'
,
sixin_amount
BIGINT
comment
'{"chs_name":"私信收入","description":"","etl":"","value":"","remark":""}'
,
sixin_amount
BIGINT
comment
'{"chs_name":"私信收入","description":"","etl":"","value":"","remark":""}'
)
comment
'分机构转化数据'
PARTITIONED
BY
(
PARTITION_DAY
STRING
comment
'分区日期'
)
ROW
FORMAT
DELIMITED
...
...
pm/yeji_day/etl/yeji_day.sql
View file @
ccab5aca
...
...
@@ -10,27 +10,6 @@ SET role admin;
INSERT
OVERWRITE
TABLE
pm
.
tl_pm_yeji_d
PARTITION
(
PARTITION_DAY
=
${
partition_day
}
)
SELECT
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
partition_date
,
t2
.
DATA_DAY
),
t3
.
DATA_MONTH
),
t4
.
PAY_MONTH
),
t5
.
day_month
)
as
data
,
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
merchant_name
,
t2
.
merchant_name
),
t3
.
merchant_name
),
t4
.
merchant_name
),
t5
.
merchant_name
)
as
merchant_name
,
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
business_group_name
,
t2
.
business_group_name
),
t3
.
business_group_name
),
t4
.
business_group_name
),
t5
.
business_group_name
)
as
business_group_name
,
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
business_partener_name
,
t2
.
business_partener_name
),
t3
.
business_partener_name
),
t4
.
business_partener_name
),
t5
.
business_partener_name
)
as
business_partener_name
,
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
city_name
,
t2
.
city_name
),
t3
.
city_name
),
t4
.
city_name
),
t5
.
city_name
)
as
city_name
,
nvl
(
hexin_pv
,
0
)
as
hexin_pv
,
nvl
(
service_pv
,
0
)
as
service_pv
,
nvl
(
clue_num
,
0
)
as
clue_num
,
nvl
(
discount
,
0
)
as
discount
,
nvl
(
recharge_amount
,
0
)
as
recharge_amount
,
nvl
(
chongzhi_amount
,
0
)
as
chongzhi_amount
,
nvl
(
all_amount
,
0
)
as
all_amount
,
nvl
(
cpc_amount
,
0
)
as
cpc_amount
,
nvl
(
cpc_chongzhi_amount
,
0
)
as
cpc_chongzhi_amount
,
nvl
(
budget
,
0
)
as
budget
,
nvl
(
cpc_click_num
,
0
)
as
cpc_click_num
,
nvl
(
liulan_amount
,
0
)
as
liulan_amount
,
nvl
(
sixin_amount
,
0
)
as
sixin_amount
,
nvl
(
service_price
,
0
)
as
service_price
SELECT
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
partition_date
,
t2
.
partition_date
),
t3
.
partition_date
),
t4
.
partition_date
),
t5
.
partition_date
),
t6
.
partition_date
),
t7
.
partition_date
)
as
data
,
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
hospital_name
,
t2
.
hospital_name
),
t3
.
hospital_name
),
t4
.
hospital_name
),
t5
.
hospital_name
),
t6
.
hospital_name
),
t7
.
hospital_name
)
as
hospital_name
,
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
nvl
(
t1
.
hospital_id
,
t2
.
hospital_id
),
t3
.
hospital_id
),
t4
.
hospital_id
),
t5
.
hospital_id
),
t6
.
hospital_id
),
t7
.
hospital_id
)
as
hospital_id
...
...
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