xiaokissoo
发布于

6.6. 如何通过JDBC将spark和hawq连接起来

from pyspark import SparkContext
from pyspark.sql import SQLContext

sc = SparkContext()
sqlContext = SQLContext(sc)
df = sqlContext.read.format('jdbc').options(url='jdbc:postgresql://node1:5432/postgres?user=myuser&password=password',dbtable='test').load()

评论
    test