You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/08/22 08:03:50 UTC

spark git commit: [SPARK-16968] Document additional options in jdbc Writer

Repository: spark
Updated Branches:
  refs/heads/master 083de00cb -> 4b6c2cbcb


[SPARK-16968] Document additional options in jdbc Writer

## What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)
This is the document for previous JDBC Writer options.

## How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
Unit test has been added in previous PR.

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Author: GraceH <jh...@paypal.com>

Closes #14683 from GraceH/jdbc_options.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4b6c2cbc
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4b6c2cbc
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4b6c2cbc

Branch: refs/heads/master
Commit: 4b6c2cbcb109c7cef6087bae32d87cc3ddb69cf9
Parents: 083de00
Author: GraceH <jh...@paypal.com>
Authored: Mon Aug 22 09:03:46 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Mon Aug 22 09:03:46 2016 +0100

----------------------------------------------------------------------
 docs/sql-programming-guide.md | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4b6c2cbc/docs/sql-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index c89286d..28cc88c 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -1058,6 +1058,20 @@ the Data Sources API. The following options are supported:
       The JDBC fetch size, which determines how many rows to fetch per round trip. This can help performance on JDBC drivers which default to low fetch size (eg. Oracle with 10 rows).
     </td>
   </tr>
+  
+  <tr>
+    <td><code>truncate</code></td>
+    <td>
+     This is a JDBC writer related option. When <code>SaveMode.Overwrite</code> is enabled, this option causes Spark to truncate an existing table instead of dropping and recreating it. This can be more efficient, and prevents the table metadata (e.g. indices) from being removed. However, it will not work in some cases, such as when the new data has a different schema. It defaults to <code>false</code>. 
+   </td>
+  </tr>
+  
+  <tr>
+    <td><code>createTableOptions</code></td>
+    <td>
+     This is a JDBC writer related option. If specified, this option allows setting of database-specific table and partition options when creating a table. For example: <code>CREATE TABLE t (name string) ENGINE=InnoDB.</code>
+   </td>
+  </tr>
 </table>
 
 <div class="codetabs">


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org