Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/21590#discussion_r197620115 --- Diff: docs/sql-programming-guide.md --- @@ -1302,9 +1302,20 @@ the following case-insensitive options: <tr> <td><code>dbtable</code></td> <td> - The JDBC table that should be read. Note that anything that is valid in a <code>FROM</code> clause of - a SQL query can be used. For example, instead of a full table you could also use a - subquery in parentheses. + The JDBC table that should be read from or written into. Note that when using it in the read + path anything that is valid in a <code>FROM</code> clause of a SQL query can be used. + For example, instead of a full table you could also use a subquery in parentheses. Its not + allowed to specify `dbtable` and `query` options at the same time. + </td> + </tr> + <tr> + <td><code>query</code></td> + <td> + A query that will be used to read data into Spark. The specified query will be parenthesized and used + as a subquery in the <code>FROM</code> clause. Spark will also assign a alias to the subquery clause. + As an example, spark will issue a query of the following form to the datasource.<br><br> + <code> SELECT <columns> FROM (<user_specified_query>) spark_gen_alias</code><br><br> + Its not allowed to specify `dbtable` and `query` options at the same time. --- End diff -- `Its` -> `it is`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org