I have a data frame and synapse sql table ,Need to merge the data frame into a synapse table with a delta location . I followed different documents but still not able to merge in synapse
Could you help me with this ?
I have a data frame and synapse sql table ,Need to merge the data frame into a synapse table with a delta location . I followed different documents but still not able to merge in synapse
Could you help me with this ?
2
Answers
You can use a databricks notebook to read the table from data lake and merge it with the dataframe after save it on data lake
Yes, you can perform a merge operation in the azure synapse with Pyspark.
Note: If the columns in your table are different from the columns that you have inserted in your data frame then you will get an error. make sure it should be same performing merge operation.
Please follow the below code:
This is my sample synapse table
Employees
and stored in delta location.After that, I created the same schema of another table as a data frame.
Then, Using the below code we can perform a Merge operation .
Output: