An Apache Spark-based analytics platform optimized for Azure.
Hello @amirkhansinga ,
Thanks for the ask and using the Microsoft Q&A platform .
For writing back to SQL table you will need to use the write method , somethng similar to
srMasterTableUpdated.write which has different mode like overwrite/append etc , read about that more here
In your case , if you try append mode you will not get the error , but then may be that does not suffice the ask .
The reason you are getting thsi error because you have a foreign key relations with some other table . Overwriting mode is basically dropping the table and creating it back with the new set of data in the data frame .
You may try to see this solution and see if it works for you , but I am sure its performance could be very bad .
Please do let me know how it goes .
Thanks
Himanshu
Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members