diff options
author | Justin Pihony <justin.pihony@gmail.com> | 2016-09-26 09:54:22 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-09-26 09:54:22 +0100 |
commit | 50b89d05b7bffc212cc9b9ae6e0bca7cb90b9c77 (patch) | |
tree | 004018c95e9fedc204d683c210af79ac43bd4212 /docs/sql-programming-guide.md | |
parent | ac65139be96dbf87402b9a85729a93afd3c6ff17 (diff) | |
download | spark-50b89d05b7bffc212cc9b9ae6e0bca7cb90b9c77.tar.gz spark-50b89d05b7bffc212cc9b9ae6e0bca7cb90b9c77.tar.bz2 spark-50b89d05b7bffc212cc9b9ae6e0bca7cb90b9c77.zip |
[SPARK-14525][SQL] Make DataFrameWrite.save work for jdbc
## What changes were proposed in this pull request?
This change modifies the implementation of DataFrameWriter.save such that it works with jdbc, and the call to jdbc merely delegates to save.
## How was this patch tested?
This was tested via unit tests in the JDBCWriteSuite, of which I added one new test to cover this scenario.
## Additional details
rxin This seems to have been most recently touched by you and was also commented on in the JIRA.
This contribution is my original work and I license the work to the project under the project's open source license.
Author: Justin Pihony <justin.pihony@gmail.com>
Author: Justin Pihony <justin.pihony@typesafe.com>
Closes #12601 from JustinPihony/jdbc_reconciliation.
Diffstat (limited to 'docs/sql-programming-guide.md')
-rw-r--r-- | docs/sql-programming-guide.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index 4ac5fae566..71bdd19c16 100644 --- a/docs/sql-programming-guide.md +++ b/docs/sql-programming-guide.md @@ -1100,9 +1100,13 @@ CREATE TEMPORARY VIEW jdbcTable USING org.apache.spark.sql.jdbc OPTIONS ( url "jdbc:postgresql:dbserver", - dbtable "schema.tablename" + dbtable "schema.tablename", + user 'username', + password 'password' ) +INSERT INTO TABLE jdbcTable +SELECT * FROM resultTable {% endhighlight %} </div> |