Property Name | Meaning |
---|---|
url |
The JDBC URL to connect to. The source-specific connection properties may be specified in the URL. e.g., jdbc:postgresql://localhost/test?user=fred&password=secret |
dbtable |
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 或者 .option("dbtable", table) val table = "(select * from table where contiiton) as t"替换query方式都可以 |
query |
A query that will be used to read data into Spark. The specified query will be parenthesized and used as a subquery in the FROM clause. Spark will also assign an alias to the subquery clause. As an example, spark will issue a query of the following form to the JDBC Source.SELECT <columns> FROM (<user_specified_query>) spark_gen_alias Below are couple of restrictions while using this option.
|
spark.read.option(jdbc)参数
最新推荐文章于 2024-06-01 00:12:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)