java.sql.SQLException:[Simba] [SparkJDBCDriver](500151)设置/关闭会话错误:打开会话错误

时间:2018-12-13 10:34:40

标签: python-3.x jdbc pyspark apache-spark-sql simba

我想在代码中将sparksql与jdbc连接

   import jaydebeapi

    conn = jaydebeapi.connect('com.simba.spark.jdbc41.Driver',"jdbc:spark://localhost:10000/default;AuthMech=3;SSL=0",{'user': 'spark', 'password': "di6'gnr"},'/hdfs/dev/scripts/pyspark/drivers/SparkJDBC41.jar',)
    curs = conn.cursor()

    curs.execute("select * from CUSTOMER")
    curs.fetchall()

    curs.close()
    conn.close()

enter image description here

0 个答案:

没有答案