📅  最后修改于: 2022-03-11 14:47:03.991000             🧑  作者: Mango
spark = SparkSession.builder.config(conf=spark_conf).getOrCreate()
#make sure the necessary jar files are loaded
#@ opt/spark/jars folder
df = spark.read \
.format("jdbc") \
.option("url", "jdbc:postgresql://:/") \
.option("dbtable", ".") \
.option("user", "") \
.option("password", "") \
.option("driver", "org.postgresql.Driver") \
.load()