What are your JDBC properties configured to? Do you have overwrite mode enabled?
On Wed, Sep 16, 2015 at 7:39 PM, guoqing0...@yahoo.com.hk < guoqing0...@yahoo.com.hk> wrote: > Spark-1.4.1 > > > *From:* Ted Yu <yuzhih...@gmail.com> > *Date:* 2015-09-17 10:29 > *To:* guoqing0...@yahoo.com.hk > *CC:* user <user@spark.apache.org> > *Subject:* Re: Table is modified by DataFrameWriter > Can you tell us which release you were using ? > > Thanks > > > > On Sep 16, 2015, at 7:11 PM, "guoqing0...@yahoo.com.hk" < > guoqing0...@yahoo.com.hk> wrote: > > Hi all, > I found the table structure was modified when use DataFrameWriter.jdbc > to save the content of DataFrame , > > sqlContext.sql("select '2015-09-17',count(1) from > test").write.jdbc(url,test,properties) > > table structure before saving: > app_key text > t_amount bigint(20) > > saved: > _c0 text > _c1 bigint(20) > > Is there any way to just save the field in sequence and do not alter the > table ? > > Thanks! > >