accessing Synapse Table from databricks using pyspark
sql_pwd= dbutils.secrets.get("keys and scope")
2
urrl="jdbc:sqlserver://synapsewus2prod.sql.azuresynapse.net:1433;database=<db_name>;user=<user_name>;password="+sql_pwd+";encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=30;"
3
df=spark.read.format("com.databricks.spark.sqldw").option("useAzureMSI","true").option("url", urrl).option("dbtable", "table name").option("tempDir","wasbs://<container location>").load()
tried the provided solution but it didn't helped. Throwed an error saying, "
com.databricks.spark.sqldw.SqlDWSideException: Azure Synapse Analytics failed to execute the JDBC query produced by the connector."
could you please help, I am trying to Update a synapse table from the pyspark dataframe that I have in Databricks.
I am having a synapse table with columns A,B,C,D and I have a Dataframe that has the values for column D that I need to update in the Synapse Table.