How to import data in batches?

When you import data, insert in batches and keep the number of rows within 10,000 for each batch.