Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
宋柯
meta_base_code
Commits
041b0692
Commit
041b0692
authored
Aug 26, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
19f5fafd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
core_indicators_monitoring.py
task/core_indicators_monitoring.py
+4
-3
搜索日报-核心.sql
task/搜索日报-核心.sql
+5
-2
No files found.
task/core_indicators_monitoring.py
View file @
041b0692
...
...
@@ -22,9 +22,7 @@ from pyspark.sql import SparkSession, DataFrame
from
pyspark.sql.functions
import
lit
import
pytispark.pytispark
as
pti
db
=
pymysql
.
connect
(
host
=
'172.16.40.158'
,
port
=
4000
,
user
=
'st_user'
,
passwd
=
'aqpuBLYzEV7tML5RPsN1pntUzFy'
,
db
=
'jerry_prod'
)
cursor
=
db
.
cursor
()
startTime
=
time
.
time
()
sparkConf
=
SparkConf
()
...
...
@@ -541,6 +539,9 @@ FROM
device_df
.
show
(
1
,
False
)
sql_res
=
device_df
.
collect
()
db
=
pymysql
.
connect
(
host
=
'172.16.40.158'
,
port
=
4000
,
user
=
'st_user'
,
passwd
=
'aqpuBLYzEV7tML5RPsN1pntUzFy'
,
db
=
'jerry_prod'
)
cursor
=
db
.
cursor
()
for
res
in
sql_res
:
print
(
res
)
partition_date
=
res
.
partition_date
...
...
task/搜索日报-核心.sql
View file @
041b0692
...
...
@@ -480,10 +480,14 @@ CREATE TABLE core_indicators_monitoring(
referrer_search_hexin_pv
BIGINT
,
referrer_search_welfare_pv
BIGINT
,
search_core_pv_div_dau
FLOAT
,
search_neirong_pv_div_dau
FLOAT
,
search_core_two_div_dau
FLOAT
,
search_neirong_two_div_dau
FLOAT
,
search_neirong_per_duration
FLOAT
,
referrer_search_neirong_pv
FLOAT
,
referrer_search_neirong_pagestay
BIGINT
,
search_hexin_two_pv
BIGINT
,
search_neirong_two_pv
BIGINT
,
pid
varchar
(
100
),
PRIMARY
KEY
(
pid
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
\ No newline at end of file
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
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