Commit d0595be5 authored by 张彦钊's avatar 张彦钊

修改测试文件

parent 4e95b998
...@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment