before batch sql insert