aboutsummaryrefslogtreecommitdiff
path: root/docs/sql-programming-guide.md
diff options
context:
space:
mode:
authorGraceH <jhuang1@paypal.com>2016-08-22 09:03:46 +0100
committerSean Owen <sowen@cloudera.com>2016-08-22 09:03:46 +0100
commit4b6c2cbcb109c7cef6087bae32d87cc3ddb69cf9 (patch)
tree79f602a3837461ab1cd61d944acc03e651dd2d8d /docs/sql-programming-guide.md
parent083de00cb608a7414aae99a639825482bebfea8a (diff)
downloadspark-4b6c2cbcb109c7cef6087bae32d87cc3ddb69cf9.tar.gz
spark-4b6c2cbcb109c7cef6087bae32d87cc3ddb69cf9.tar.bz2
spark-4b6c2cbcb109c7cef6087bae32d87cc3ddb69cf9.zip
[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 <jhuang1@paypal.com> Closes #14683 from GraceH/jdbc_options.
Diffstat (limited to 'docs/sql-programming-guide.md')
-rw-r--r--docs/sql-programming-guide.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index c89286d0e4..28cc88c322 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">