How to set jdbc/partitionColumn type to Date in spark 2.4.1

后端 未结 4 1928
清歌不尽
清歌不尽 2021-01-05 20:14

I am trying to retrieve data from oracle using spark-sql-2.4.1 version. I tried to set the JdbcOptions as below :

    .option(\"lowerBound\", \"31-MAR-02\");         


        
4条回答
  •  时光取名叫无心
    2021-01-05 20:35

    all of the following options must be set in this way in order for it to work:

    spark.read
          .option("header", true)
          .option("inferSchema", true)
          .option("timestampFormat", "MM/dd/yyyy h:mm:ss a")
          .csv("PATH_TO_CSV")
    

提交回复
热议问题