Empty database before a scheduled sql import

Hey i saw in the videos it is possible to empty out or skip data that is already in the monogdb collection.
But i cant seem to find it in the program. Can someone help me with this?

Hi Martin,

You can use insertion mode when importing SQL databases to skip documents with a duplicate _id or clear the collection first if it already exists, as shown here:
image (3)

This feature is also available in our migration from SQL tool here:

I hope that helps!

Regards,
Andrew

I’d also add that you’ll be wanting to map an id field from the SQL table to the _id field in MongoDB for this to work well (otherwise you’ll be creating new _id ObjectID’s and they will by definition, never clash). So for example

Here, I’ve mapped the SQL primary key to the _id (just changing the field name in the table). The * marks the primary key field if you are looking for which field is a good candidate to be the _id field.

Dj