After lots of trial and error, I was able to get this to work. The good news is that it was worth it, the functionality is very powerful.
Like you, I bulk upload to a temporary table (thing). Once this is done, I then process the data into the proper tables.
In my case, I had to manipulate the data a bit, which is why the data that I am running though the stringify function (to format in a manner that the bulk data loader is expecting) is called “datawithOrg”… I think in your case, it would simply be the data returned from the importer.
Note that there may be a better way to do this from a pure programming perspective, but it is working reliably for me.
Hope that is helpful.