spark reading data from mysql in parallel

后端 未结 2 1251
忘了有多久
忘了有多久 2020-12-13 22:40

Im trying to read data from mysql and write it back to parquet file in s3 with specific partitions as follows:

df=sqlContext.read.format(\'jdbc\')\\
   .opti         


        
2条回答
  •  执念已碎
    2020-12-13 23:14

    You should set these properties:

    partitionColumn, 
    lowerBound, 
    upperBound, 
    numPartitions
    

    as it is documented here: http://spark.apache.org/docs/latest/sql-programming-guide.html#jdbc-to-other-databases

提交回复
热议问题