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
d0595be5
Commit
d0595be5
authored
Nov 14, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试文件
parent
4e95b998
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
test.py
local/test.py
+8
-4
No files found.
local/test.py
View file @
d0595be5
...
@@ -12,11 +12,15 @@ def fetch_data(start_date, end_date):
...
@@ -12,11 +12,15 @@ def fetch_data(start_date, end_date):
.
config
(
'spark.some.config,option0'
,
'some-value'
)
\
.
config
(
'spark.some.config,option0'
,
'some-value'
)
\
.
getOrCreate
()
.
getOrCreate
()
ctx
=
SQLContext
(
sc
)
ctx
=
SQLContext
(
sc
)
df
=
ctx
.
read
.
format
(
"jdbc"
)
.
options
(
url
=
"jdbc:mysql://rm-m5e842126ng59jrv6.mysql.rds.aliyuncs.com:3306/doris_prod"
,
driver
=
"com.mysql.jdbc.Driver"
,
dbtable
=
"device diary_queue"
,
user
=
"doris"
,
password
=
"o5gbA27hXHHm"
)
.
load
()
df
=
ctx
.
read
.
format
(
"jdbc"
)
.
options
(
url
=
"jdbc:mysql://192.168.15.12:4000/jerry_prod"
,
#
df = ctx.read.format("jdbc").options(url="jdbc:mysql://192.168.15.12:4000/jerry_prod",
driver
=
"com.mysql.jdbc.Driver"
,
#
driver="com.mysql.jdbc.Driver",
dbtable
=
"data_feed_click"
,
#
dbtable = "data_feed_click",
user
=
"root"
,
password
=
"3SYz54LS9#^9sBvC"
)
.
load
()
#
user="root",password = "3SYz54LS9#^9sBvC").load()
df
.
show
(
6
)
df
.
show
(
6
)
# url = "jdbc:mysql://10.66.157.22:4000/jerry_prod"
# url = "jdbc:mysql://10.66.157.22:4000/jerry_prod"
...
...
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