Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
f7da0dec
Commit
f7da0dec
authored
Nov 26, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crv feature file changed
parent
ed6775fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
crv_feature.py
tensnsorflow/crv_feature.py
+13
-6
No files found.
tensnsorflow/crv_feature.py
View file @
f7da0dec
...
@@ -10,16 +10,23 @@ def get_data():
...
@@ -10,16 +10,23 @@ def get_data():
ctx
=
SQLContext
(
sc
)
ctx
=
SQLContext
(
sc
)
# end_date = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%Y-%m-%d")
# end_date = (datetime.date.today() - datetime.timedelta(days=1)).strftime("%Y-%m-%d")
# start_date = (datetime.date.today() - datetime.timedelta(days=day)).strftime("%Y-%m-%d")
# start_date = (datetime.date.today() - datetime.timedelta(days=day)).strftime("%Y-%m-%d")
dbtable
=
"(select device_id,stat_date,ucity_id,cid_id,diary_service_id,y,z,clevel1_id,"
\
dbtable
=
"(select * from esmm_data)temp"
"slevel1_id,ccity_name,scity_id from jerry_prod.esmm_data"
\
esmm_data
=
ctx
.
read
.
format
(
"jdbc"
)
.
options
(
url
=
"jdbc:mysql://10.66.157.22:4000/jerry_prod"
,
"inner join eagle.home_tab_click "
\
"on jerry_prod.esmm_data.device_id = eagle.home_tab_click.device_id)temp"
click
=
ctx
.
read
.
format
(
"jdbc"
)
.
options
(
url
=
"jdbc:mysql://10.66.157.22:4000"
,
driver
=
"com.mysql.jdbc.Driver"
,
driver
=
"com.mysql.jdbc.Driver"
,
dbtable
=
dbtable
,
dbtable
=
dbtable
,
user
=
"root"
,
user
=
"root"
,
password
=
"3SYz54LS9#^9sBvC"
)
.
load
()
password
=
"3SYz54LS9#^9sBvC"
)
.
load
()
click
.
show
(
6
)
esmm_data
.
show
(
6
)
dbtable
=
"(select * from home_tab_click)temp"
tab_click
=
ctx
.
read
.
format
(
"jdbc"
)
.
options
(
url
=
"jdbc:mysql://10.66.157.22:4000/eagle"
,
driver
=
"com.mysql.jdbc.Driver"
,
dbtable
=
dbtable
,
user
=
"root"
,
password
=
"3SYz54LS9#^9sBvC"
)
.
load
()
tab_click
.
show
(
6
)
esmm_data
=
esmm_data
.
join
(
tab_click
,
esmm_data
.
device_id
==
tab_click
.
device_id
,
"left"
)
esmm_data
.
show
(
6
)
...
...
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