Change CSV export to use batches so things don't blow up.