1
2
3
4
5
6
import java.util.Properties
val target_df = targetRdd.toDF()
val prop = new Properties()
prop.put("user", "username")
prop.put("password", "password")
ret_df.write.mode("append").jdbc("jdbc:mysql://host:port/database","table",prop)

Comments

2016-12-05