Created
December 24, 2021 00:20
-
-
Save 1ambda/864560a50e0794a56b31c4f27e92c3ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfListingJdbc = spark\ | |
.read\ | |
.format("jdbc")\ | |
.option("driver", "com.mysql.jdbc.Driver")\ | |
.option("url", "jdbc:mysql://localhost:3306?useSSL=false")\ | |
.option("dbtable", "pipeline.ListingMeta")\ | |
.option("user", "root")\ | |
.option("password", "root")\ | |
.option("partitionColumn", "listing_id")\ | |
.option("lowerBound", "0")\ | |
.option("upperBound", "1000")\ | |
.option("fetchsize", "200")\ | |
.option("customSchema", "listing_id LONG")\ | |
.option("numPartitions", "5")\ | |
.load() | |
dfListingJdbc.printSchema() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment