我在 Azure Databricks 中有一个 PySpark 数据框。我想写入 Azure Synapse。但我得到了错误。
com.microsoft.sqlserver.jdbc.SQLServerException: The statement failed. Column 'ETL_TableName' has a data type that cannot participate in a columnstore index.
我检查了 Synapse 的连接。一切正常,我能够读取数据。但是在写作时,我遇到了问题。任何人都可以帮助如何处理这个错误。
将数据写入 Synapse 的代码:
dataFrame.repartition(1).write.format("jdbc")\
.option("url", azureurl)\
.option("tempDir", tempDir) \
.option("forwardSparkAzureStorageCredentials", "true") \
.option("dbTable", dbTable)\
.option("append", "true")\
.save()