All import sets created for Import SET API calls are "Synchronous". What this means is that as an import set row is created, it is transformed immediately.
To prevent immediate transform the import set can be made "Asynchronous".
This can be achieved as follows:
- Create a "Before" insert business rule on the sys_import_set table with a conditional check on the Import set table (table_name) that should not be transformed synchronously.
- Under actions, add 'Mode' to 'Asynchronous'.
- Create a Scheduled job that runs every few minutes and transforms the 'asynchronous' import set, with the following script and set it to run 'Periodically'.
There is an OOB Scheduled Script Execution "Asynchronous Import Set Transformer", you can use that as a guideline and change line 8 (igr.addQuery("state", "loaded")) and replace it with the following 2 lines:
igr.addQuery("table_name", "the staging table name");
The complete Script: