Pyspark:从SQL Server读取数据-sparkSession.read.format行的语法错误

时间:2018-07-05 23:04:35

标签: pyspark pyspark-sql spark-submit

systems_query = """(SELECT col1 FROM MytableConfig) as mytestdata"""  

下面的行显示语法错误

systems_df_test = sparkSession.read.format("jdbc").option("url",  jdbc:sqlserver://"+DEVT_SERVER+":1433;authenticationScheme=JavaKerberos;Database="+DATABASE+";user="+DB_USER+";password="+DB_PASS+").option("dbtable", systems_query).option("numPartitions", "1").load()  

0 个答案:

没有答案