Have the batch import endpoint manage its own transactions based on which database is running.

Explicitly roll back the transaction on error.