After, Reading data from csv file.
First create a list before inserting data to system.
Then convert that list to set after then again sort the data which is in set.
Here , you gets every data exactly one time in sorted manner.
I am using bulk_create to upload some data from excel to django db. Since the data is huge I had to use bulk_create instead of .create and .save. But the problem is that I need to show the user how many duplicate data has been found and has not been uploaded due to integrity error. Is there a way to get the number of errors or duplicate data while using bulk upload?
is there a way to get the count of conflicts while using Django ...bulk_create(.., ignore_conflicts=True)?