{"action":"opened","issue":{"url":"https://api.github.com/repos/databricks/spark-redshift/issues/170","repository_url":"https://api.github.com/repos/databricks/spark-redshift","labels_url":"https://api.github.com/repos/databricks/spark-redshift/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/databricks/spark-redshift/issues/170/comments","events_url":"https://api.github.com/repos/databricks/spark-redshift/issues/170/events","html_url":"https://github.com/databricks/spark-redshift/issues/170","id":131199105,"number":170,"title":"does it support to specify partition column and numbers?","user":{"login":"biolearning","id":6327130,"avatar_url":"https://avatars.githubusercontent.com/u/6327130?v=3","gravatar_id":"","url":"https://api.github.com/users/biolearning","html_url":"https://github.com/biolearning","followers_url":"https://api.github.com/users/biolearning/followers","following_url":"https://api.github.com/users/biolearning/following{/other_user}","gists_url":"https://api.github.com/users/biolearning/gists{/gist_id}","starred_url":"https://api.github.com/users/biolearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolearning/subscriptions","organizations_url":"https://api.github.com/users/biolearning/orgs","repos_url":"https://api.github.com/users/biolearning/repos","events_url":"https://api.github.com/users/biolearning/events{/privacy}","received_events_url":"https://api.github.com/users/biolearning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-04T00:23:01Z","updated_at":"2016-02-04T00:23:01Z","closed_at":null,"body":"Like  native Spark SQL JDBC to support partition based on specified column?\r\n\r\n> jdbc(url, table, column=None, lowerBound=None, upperBound=None, numPartitions=None, predicates=None, properties=None)\r\nConstruct a DataFrame representing the database table accessible via JDBC URL url named table and connection properties.\r\n\r\nThe column parameter could be used to partition the table, then it will be retrieved in parallel based on the parameters passed to this function.\r\n\r\nThe predicates parameter gives a list expressions suitable for inclusion in WHERE clauses; each one defines one partition of the DataFrame.\r\n\r\n::Note: Don’t create too many partitions in parallel on a large cluster; otherwise Spark might crash your external database systems.\r\n\r\nParameters:\t\r\nurl – a JDBC URL\r\ntable – name of table\r\ncolumn – the column used to partition\r\nlowerBound – the lower bound of partition column\r\nupperBound – the upper bound of the partition column\r\nnumPartitions – the number of partitions\r\npredicates – a list of expressions\r\nproperties – JDBC database connection arguments, a list of arbitrary string tag/value. Normally at least a “user” and “password” property should be included.\r\nReturns:\t\r\na DataFrame\r\nNew in version 1.4.\r\n"}}