Error Code
Py4JJavaError: An error occurred while calling o1790.save.
: com.databricks.spark.sqldw.SqlDWSideException: Azure Synapse Analytics failed to execute the JDBC query produced by the connector.
Underlying SQLException(s):
- com.microsoft.sqlserver.jdbc.SQLServerException: Not able to validate external location because the remote server returned an error: (403) Forbidden. [ErrorCode = 105215] [SQLState = S0001]
at com.databricks.spark.sqldw.Utils$.wrapExceptions(Utils.scala:729)
at com.databricks.spark.sqldw.DefaultSource.createRelation(DefaultSource.scala:89)
at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:47)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute
Solution
Assign Storage Blob Data Contributor role to the Azure Synapse Analytics server’s managed identity.
select Storage Blob Data Contributor role
select name of manage identity name.