{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-carbondata/issues/212","repository_url":"https://api.github.com/repos/apache/incubator-carbondata","labels_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/212/comments","events_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/212/events","html_url":"https://github.com/apache/incubator-carbondata/pull/212","id":180987305,"number":212,"title":"[CARBONDATA-285] Use path parameter in Spark datasource API","user":{"login":"jackylk","id":6500698,"avatar_url":"https://avatars.githubusercontent.com/u/6500698?v=3","gravatar_id":"","url":"https://api.github.com/users/jackylk","html_url":"https://github.com/jackylk","followers_url":"https://api.github.com/users/jackylk/followers","following_url":"https://api.github.com/users/jackylk/following{/other_user}","gists_url":"https://api.github.com/users/jackylk/gists{/gist_id}","starred_url":"https://api.github.com/users/jackylk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackylk/subscriptions","organizations_url":"https://api.github.com/users/jackylk/orgs","repos_url":"https://api.github.com/users/jackylk/repos","events_url":"https://api.github.com/users/jackylk/events{/privacy}","received_events_url":"https://api.github.com/users/jackylk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-04T19:48:59Z","updated_at":"2016-10-06T11:38:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/212","html_url":"https://github.com/apache/incubator-carbondata/pull/212","diff_url":"https://github.com/apache/incubator-carbondata/pull/212.diff","patch_url":"https://github.com/apache/incubator-carbondata/pull/212.patch"},"body":"Currently, when using carbon with spark datasource API, it need to give database name and table name as parameter, it is not the normal way of datasource API usage. In this PR, database name and table name is not required to give, user need to specify the `path` parameter (indicating the path to table folder) only when using datasource API\r\n\r\nbefore:\r\n```\r\ndf.write\r\n   .format(\"carbondata\")\r\n   .option(\"tableName\", tableName)\r\n   .mode(SaveMode.Overwrite)\r\n   .save()\r\n```\r\n\r\nafter:\r\n```\r\ndf.write\r\n   .format(\"carbondata\")\r\n   .mode(SaveMode.Overwrite)\r\n   .save(\"store_path/default/table_name\")\r\n```\r\n\r\nThe same for read interface."},"comment":{"url":"https://api.github.com/repos/apache/incubator-carbondata/issues/comments/251937799","html_url":"https://github.com/apache/incubator-carbondata/pull/212#issuecomment-251937799","issue_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/212","id":251937799,"user":{"login":"jackylk","id":6500698,"avatar_url":"https://avatars.githubusercontent.com/u/6500698?v=3","gravatar_id":"","url":"https://api.github.com/users/jackylk","html_url":"https://github.com/jackylk","followers_url":"https://api.github.com/users/jackylk/followers","following_url":"https://api.github.com/users/jackylk/following{/other_user}","gists_url":"https://api.github.com/users/jackylk/gists{/gist_id}","starred_url":"https://api.github.com/users/jackylk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackylk/subscriptions","organizations_url":"https://api.github.com/users/jackylk/orgs","repos_url":"https://api.github.com/users/jackylk/repos","events_url":"https://api.github.com/users/jackylk/events{/privacy}","received_events_url":"https://api.github.com/users/jackylk/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T11:38:38Z","updated_at":"2016-10-06T11:38:38Z","body":"Since CarbonData is a file format, so ideally it should support saving it to any folder. Currently we are forcing database and table folder structure, it makes the usage different from other Spark file datasource like parquet and orc. \r\nAnd I think by accepting only path parameter, it is easier to integrate with Spark 2.0 and other processing framework"}}
{"actor":{"display_login":"jackylk"}}