当先锋百科网

首页 1 2 3 4 5 6 7

//数据库连接

val ReplaceRDD = sqlContext.read.format("jdbc").options(

Map("url"->"jdbc:sqlserver://192.168.15.218;DatabaseName=hlv_66law_CollectData",

// "dbtable"->"(select EssenId,ReplyContent,Title from EssenceAskByKey) as esa",

"dbtable"->"(select pro,city,contry,title,condition,material,process,place,timelimit,institution,cost,lawbase,url,isupload,id from banshizhinan_analyzes ORDER BY id offset 150000 row fetch next 10000 rows only) s",

"driver"->"com.microsoft.sqlserver.jdbc.SQLServerDriver",

"user"-> "sa",

"numPartitions" -> "4",

"lowerBound" -> "1",

"fetchSize"->"100",

"fetchSize"->"100",

"password"->"20040928")).load().rdd