Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/sql-data-sources-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ the following case-insensitive options:
Example:<br>
<code>
spark.read.format("jdbc")<br>
&nbsp&nbsp .option("dbtable", "(select c1, c2 from t1) as subq")<br>
&nbsp&nbsp .option("partitionColumn", "subq.c1"<br>
&nbsp&nbsp .load()
.option("url", jdbcUrl)<br>
.option("query", "select c1, c2 from t1")<br>
.load()
</code></li>
</ol>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,13 @@ class JDBCOptions(
|the partition columns using the supplied subquery alias to resolve any ambiguity.
|Example :
|spark.read.format("jdbc")
| .option("dbtable", "(select c1, c2 from t1) as subq")
| .option("partitionColumn", "subq.c1"
| .load()
| .option("url", jdbcUrl)
| .option("dbtable", "(select c1, c2 from t1) as subq")
| .option("partitionColumn", "c1")
| .option("lowerBound", "1")
| .option("upperBound", "100")
| .option("numPartitions", "3")
| .load()
""".stripMargin
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,13 @@ class JDBCSuite extends QueryTest
|the partition columns using the supplied subquery alias to resolve any ambiguity.
|Example :
|spark.read.format("jdbc")
| .option("dbtable", "(select c1, c2 from t1) as subq")
| .option("partitionColumn", "subq.c1"
| .load()
| .option("url", jdbcUrl)
| .option("dbtable", "(select c1, c2 from t1) as subq")
| .option("partitionColumn", "c1")
| .option("lowerBound", "1")
| .option("upperBound", "100")
| .option("numPartitions", "3")
| .load()
""".stripMargin
val e5 = intercept[RuntimeException] {
sql(
Expand Down