Coder Social home page Coder Social logo

split-csv's People

Contributors

tolik505 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

split-csv's Issues

Splitting a file into 50k parts generates larger files

hi Tolik505,

i am using your great split-csv lib for golang

but if i try to split a big csv into 50k files, lot of bigger files land in the destination folder (see screenshot)

Do you have an idea why ?

my setup looks like this

splitDir = "/tmp/split"
splitter = split_csv.New()
splitter.Separator = ";" // "," is by default
splitter.FileChunkSize = 50000
splitter.WithHeader = false

path := "/tmp/split/feed__" + fileID + "__.csv"
csvfile, err := os.Create(path)
defer csvfile.Close()

io.Copy(csvfile, reader)

splitter.Split(path, splitDir)

Adrian
(i attached a screenshot in the comment)

multiline cell

if we have:

"id";"name";"text"
"1222223";"тест";"Шла
Маша
по
шоссе"
123;Петя;Во какой

Unexpected header and unexpected split files

Found a bug.
If spliter.bufferSize < len(header). the field st.columnsCount will not be initialized correctly by countCompletedColumns causes st.header is unexpected and generate unexpected files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.