Skip to content

Sorts efficiently the csv file based on one of its columns

Notifications You must be signed in to change notification settings

chernib/SortCsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SortCsv

Sorts efficiently the csv file based on one of its columns

Consider a CSV input file.

  1. Design a program which sorts efficiently the csv file based on one of its columns. The program should never have more than x number of lines in memory

  2. Implement the above program using java, single thread

  3. Input parameters: a. path to the input file. You can assume that there are no additional files in the folder with the input file

    b. column number

    c. max number of lines in memory

Importent

  • Please set up a a scr folder as a Sources Root folde and resources folder as a Resources Root folder
  • Before the next run either delete or empty output folder

How to run

  • Put any .csv file into the resources folder or use the pre-defined data.csv file
  • Run the application
  • Find the sorted file at output folder

Configuration

You can change the following in configuration.properties file in resourse folder:

  • The path for the initial CSV file
  • Column number to perform the sort operation
  • Maximum number of lines in memory

About

Sorts efficiently the csv file based on one of its columns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages