question

NaveenKumar-0720 avatar image
0 Votes"
NaveenKumar-0720 asked vishwa-3755 commented

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.

azure-sql-databaseazure-synapse-analyticsazure-databricks
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @NaveenKumar-0720,

Thanks for the question and using MS Q&A platform.

Could you please the stack trace of the error message?

0 Votes 0 ·

Hello @NaveenKumar-0720,

Just checking in if you have had a chance to see the previous response. We need the following information to understand/investigate this issue further.

0 Votes 0 ·

@NaveenKumar-0720 did you get any solution for this ,
Updating a synapse table using databricks query.

0 Votes 0 ·

0 Answers