虽然通过在星火JDBC连接获取来自SQL Server的数据,我发现我可以设置一些并行的参数,如partitionColumn,lowerBound,upperBound,和numPartitions.我已经通过spark文档,但无法理解它.
谁能解释一下这些参数的含义?
我正在将数据从sql服务器拉到hdfs。这是我的摘录,
val predicates = Array[String]("int_id < 500000", "int_id >= 500000 && int_id < 1000000")
val jdbcDF = spark.read.format("jdbc")
.option("url", dbUrl)
.option("databaseName", "DatabaseName")
.option("dbtable", table)
.option("user", "***")
.option("password", "***")
.option("predicates", predicates)
.load()
Run Code Online (Sandbox Code Playgroud)
我的Intellij IDE一直在说
“类型不匹配,预期为布尔值或长整型或双精度或字符串,实际:Array [String]”
在谓词中。不知道这怎么了。谁能看到这有什么问题吗?另外,我如何在这里使用提取大小?
谢谢。