menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Databases

>

Split a Hu...
source image

Dev

1M

read

137

img
dot

Image Credit: Dev

Split a Huge CSV File into Multiple Smaller CSV Files #eg69

  • The problem is to split a huge CSV file into multiple smaller CSV files, as the size of the file is too large to be loaded into memory at once.
  • The objective is to divide the file into smaller files, each containing a maximum of 100,000 rows.
  • The solution involves creating a cursor for the original CSV file and then looping through it to read in 100,000 rows at a time.
  • The rows are then exported into separate smaller CSV files, named sample1.csv, sample2.csv, and so on.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app