--------+我尝试下面的代码,但它抛出错误desc_df.write.format('jdbc').options( url='jdbc:mysql://localhost:3306/test', driver='com.mysql.jdbc.Driver', dbtable='pyspark_tbl', user='root', password='pwd').mode('append').save()我面临以下错误py4j.protocol.Py4JJavaError: An error occurred while calling o235.save. : java.lang.RuntimeException: org.apache.spark.sql.execution.datasources.jdbc.DefaultSource does not allow create table as select.有人可以帮我解决这个问题。Note: I have seen many posts on this , i have tried most of them but still same result.`
9条答案
按热度按时间gc0ot86w1#
--------+
5m1hhzi42#
--------+
oogrdqng3#
--------+ |summary| val1 | val2 | val3 | +-------+
u0njafvf4#
--------+
3df52oht5#
--------+ | count| 17547479| 17547479| 17547477| | mean|2.0946498354549963| 1.474746257282603|1943.9881619448768| | stddev|1.7921560893864912|1.2898177241581452| 40126.73218327477| | min| 0.0| 0.0| 0.0| | max| 99.0| 60.0| 1.6240624E8| +-------+
pvabu6sv6#
--------+
9fkzdhlc7#
--------+
我尝试下面的代码,但它抛出错误
desc_df.write.format('jdbc').options( url='jdbc:mysql://localhost:3306/test', driver='com.mysql.jdbc.Driver', dbtable='pyspark_tbl', user='root', password='pwd').mode('append').save()我面临以下错误
py4j.protocol.Py4JJavaError: An error occurred while calling o235.save. : java.lang.RuntimeException: org.apache.spark.sql.execution.datasources.jdbc.DefaultSource does not allow create table as select.有人可以帮我解决这个问题。
Note: I have seen many posts on this , i have tried most of them but still same result.`w8rqjzmb8#
--------+
lvmkulzt9#
--------+