As a migration-center user you will probably know the powerful delta scanning feature of many of our adapters. Unfortunately, due to its generic nature, our database scanner does not directly support delta scanning. But with some additional configuration, you can use it to scan the records that have been updated since the last or initial scanning. To do so, you need to change the configuration of your database scanner as follows:
- Set the parameter "scanUpdates" in your database scanner to "true". With "scanUpdates" turned on, the scanner will add all records it scans as updates into the migration-center database.
- Change your main query in the scanner's query XML file to only return updated records. For example, add another condition to the where clause of your query that will match only those records that have been modified since the last scan run.
If your initial main query was
select source_id from my_source_table where record_type = 'invoice'then the updated query could look like this
select source_id from my_source_table where record_type = 'invoice'
and last_modified > date('2018-11-19 09:00:00')
That's it. When you run your database scanner again with these modifications, it will scan only updated records and store them as updates in the migration-center database.
A future version of the database scanner will fully support delta scanning, so that you do not have to change the scanner's configuration after the initial scan run.