Re: write new data to mysql

2016-01-08 Thread Todd Nist
Sorry, did not see your update until now. On Fri, Jan 8, 2016 at 3:52 PM, Todd Nist wrote: > Hi Yasemin, > > What version of Spark are you using? Here is the reference, it is off of > the DataFrame > https://spark.apache.org/docs/latest/api/java/index.html#org.apache.spark.sql.DataFrame > and

Re: write new data to mysql

2016-01-08 Thread Todd Nist
Hi Yasemin, What version of Spark are you using? Here is the reference, it is off of the DataFrame https://spark.apache.org/docs/latest/api/java/index.html#org.apache.spark.sql.DataFrame and provides a DataFrameWriter, https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/DataFrameW

Re: write new data to mysql

2016-01-08 Thread Yasemin Kaya
When i change the version to 1.6.0, it worked. Thanks. 2016-01-08 21:27 GMT+02:00 Yasemin Kaya : > Hi, > There is no write function that Todd mentioned or i cant find it. > The code and error are in gist > . Could you check > it out please? >

Re: write new data to mysql

2016-01-08 Thread Yasemin Kaya
Hi, There is no write function that Todd mentioned or i cant find it. The code and error are in gist . Could you check it out please? Best, yasemin 2016-01-08 18:23 GMT+02:00 Todd Nist : > It is not clear from the information provided why th

Re: write new data to mysql

2016-01-08 Thread Todd Nist
It is not clear from the information provided why the insertIntoJDBC failed in #2. I would note that method on the DataFrame as been deprecated since 1.4, not sure what version your on. You should be able to do something like this: DataFrame.write.mode(SaveMode.Append).jdbc(MYSQL_CONNECTION_URL

Re: write new data to mysql

2016-01-08 Thread Ted Yu
Which Spark release are you using ? For case #2, was there any error / clue in the logs ? Cheers On Fri, Jan 8, 2016 at 7:36 AM, Yasemin Kaya wrote: > Hi, > > I want to write dataframe existing mysql table, but when i use > *peopleDataFrame.insertIntoJDBC(MYSQL_CONNECTION_URL_WRITE, > "track_o

write new data to mysql

2016-01-08 Thread Yasemin Kaya
Hi, I want to write dataframe existing mysql table, but when i use *peopleDataFrame.insertIntoJDBC(MYSQL_CONNECTION_URL_WRITE, "track_on_alarm",false)* it says "Table track_on_alarm already exists." And when i *use peopleDataFrame.insertIntoJDBC(MYSQL_CONNECTION_URL_WRITE, "track_on_alarm",true)