{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14077","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14077/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14077/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14077/events","html_url":"https://github.com/apache/spark/pull/14077","id":164178628,"number":14077,"title":"[SPARK-16402] [SQL] JDBC Source: Implement save API of DataFrameWriter","user":{"login":"gatorsmile","id":11567269,"avatar_url":"https://avatars.githubusercontent.com/u/11567269?v=3","gravatar_id":"","url":"https://api.github.com/users/gatorsmile","html_url":"https://github.com/gatorsmile","followers_url":"https://api.github.com/users/gatorsmile/followers","following_url":"https://api.github.com/users/gatorsmile/following{/other_user}","gists_url":"https://api.github.com/users/gatorsmile/gists{/gist_id}","starred_url":"https://api.github.com/users/gatorsmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatorsmile/subscriptions","organizations_url":"https://api.github.com/users/gatorsmile/orgs","repos_url":"https://api.github.com/users/gatorsmile/repos","events_url":"https://api.github.com/users/gatorsmile/events{/privacy}","received_events_url":"https://api.github.com/users/gatorsmile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-07-06T21:28:30Z","updated_at":"2016-09-01T22:59:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14077","html_url":"https://github.com/apache/spark/pull/14077","diff_url":"https://github.com/apache/spark/pull/14077.diff","patch_url":"https://github.com/apache/spark/pull/14077.patch"},"body":"#### What changes were proposed in this pull request?\r\nBefore this PR, we are unable to call the `save` API of `DataFrameWriter` when the source is JDBC. For example, \r\n```Scala\r\ndf.write\r\n  .format(\"jdbc\")\r\n  .option(\"url\", url1)\r\n  .option(\"dbtable\", \"TEST.TRUNCATETEST\")\r\n  .option(\"user\", \"testUser\")\r\n  .option(\"password\", \"testPass\")\r\n  .save() \r\n```\r\nThe error message users will get is like\r\n```\r\norg.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider does not allow create table as select.\r\njava.lang.RuntimeException: org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider does not allow create table as select.\r\n```\r\n\r\nAt the same time, users can do it for the other data sources, like `parquet`\r\n\r\nThis PR is to implement `createRelation` of `CreatableRelationProvider`. After the changes, we can use `save` API of `DataFrameWriter`. \r\n\r\nCloses #12601\r\n#### How was this patch tested?\r\nAdded test cases"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/244237751","html_url":"https://github.com/apache/spark/pull/14077#issuecomment-244237751","issue_url":"https://api.github.com/repos/apache/spark/issues/14077","id":244237751,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T22:59:44Z","updated_at":"2016-09-01T22:59:44Z","body":"**[Test build #64805 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64805/consoleFull)** for PR 14077 at commit [`2e799ce`](https://github.com/apache/spark/commit/2e799ce86652bc5c03d21fdbf0a11fab20b37c39).\n * This patch **fails Spark unit tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}