I will be importing data from SQL Server into Microsoft Dynamics CRM (Dataverse) using a custom Console application (C#) I will work on. One of the requirements is that we can restart the import in case something happens and the application fails - and the application should continue from the last imported row. How can I achieve this?
I have two ideas for now, but I would like to hear other opinions (or maybe best practices from people that have already done this):
- An additional column in the SQL table which indicates whether the row has been migrated (requires writing data back to the DB which will impact the speed)
- Always get all data from SQL and check if the IDs are existing in CRM (if we stop almost at the end, we will have to go through all rows just to get to one that is not imported yet)
The rows will be not ordered and will be the same on the next try.