What are your JDBC properties configured to? Do you have overwrite mode
enabled?

On Wed, Sep 16, 2015 at 7:39 PM, [email protected] <
[email protected]> wrote:

> Spark-1.4.1
>
>
> *From:* Ted Yu <[email protected]>
> *Date:* 2015-09-17 10:29
> *To:* [email protected]
> *CC:* user <[email protected]>
> *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, "[email protected]" <
> [email protected]> 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!
>
>

Reply via email to