This library splits a file in several, so an ETL mechanism (like Spring Batch) is able to read data in parallel, improving overall performance.
This library would be used in JVM-based applications.
Created in Clojure functional language.
- add function to remove generated files
- improve unit tests using some cool lib
add unit testsadd file to Leiningen project, in order to generate a lib jar
$ lein uberjar
Just call the lib function:
split-file [file pieces]
And your file will be splitted in pieces.
(split-file "test-file.csv" 3)
- test-file.csv file has five lines
- It will generate:
- test-file.csv.0: containing 2 lines
- test-file.csv.1: containing 2 lines
- test-file.csv.2: containing the remainder 5th line
Copyright © 2019 Daniel Medeiros
Distributed under the MIT License.