wrap import in a transaction