Skip to content

Write a CSV query engine that allows to run simple queries on potentially large CSV files Using Java SE

Notifications You must be signed in to change notification settings

zwdOr20/Java_CSV_Query-side-project-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java csv query (Side project)

Basic Overview

This project consist of a csv query tool built using java 8.

The idea behind is trying to create a tool (like sql scripting interpreter) to retreive data from csv file using sql syntax.

Real use scenario

Those are the steps to follow :

  • Open cmd and cd to src folder

  • javac *.java to compile project

  • java Oracle run the project

  • Now you can interacte with program via cmd

Rules to avoid bugs :

  • Don't give fake pathfile

  • SQL words should be in upperCase : SELECT FROM IMPORT WHERE

  • Import Stataement ex : IMPORT ../document.csv;

  • Select Statement ex :

         * SELECT ID, Name FROM ../document.csv ;
         * SELECT ID,Age FROM ../document.csv WHERE ID = 1 ;
         * SELECT ID, age,name FROM ../document.csv WHERE ID > 1 AND Name != 'OMAR';
         * SELECT ID FROM ../document.csv WHERE ID > 1 or Name != 'OMAR';
    

NB : this program can't check more then two conditions in predicat => (ID < 10 AND ID > 3) or id = 5 will not work.

Feel free to download the code and use it :)

About

Write a CSV query engine that allows to run simple queries on potentially large CSV files Using Java SE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages