Skip to content

devcodes9/CSV-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

CSV Manager

Created a basic web application which:

-Accepts one or more CSV files as an input and stores in a database.

-Reads the CSV file and returns the output of all the available column names in all the CSV files.

-Accepts column-specific filters to fetch fields that match the queries.

API Reference

Post one or more CSV files

  POST http://localhost:8080/api/v1/upload-csv

fileHandler(req, res)

Reads the csv files you upload and saves it in MongoDB database
Input Output Description
form-data success: true Required."Content-Type": "multipart/form-data"

Warning: csv file size should be < 1 mb


Post the names of CSV files

  POST http://localhost:8080/api/v1/columns

getAllColumns(req, res)

To get all the available column names from files when files are uploaded.
Input Output Description
filename Array Columns Required."Content-Type": "multipart/form-data"
example output: ["seller_id","profit","loss","order_id","delivered"] 

Get the names of specific columns

  GET http://localhost:8080/api/v1/data?queryColumn=${queryColumn}

getData(req, res)

To get fields that match the queries using column specific filter.
Input Output Description
`` Array Required : column names as query
 Example output for get request of : localhost:8080/api/v1/data?queryColumn=seller_id,order_id
{
        "fileName": "sellers.csv",
        "columnName": "seller_id",
        "data": [
            {
                "seller_id": "1"
            },
            {
                "seller_id": "2"
            }
        ]
    },
    {
        "fileName": "sales.csv",
        "columnName": "order_id",
        "data": [
            {
                "order_id": "1"
            },
            {
                "order_id": "2"
            }
        ]
    }
]

Installation

Install the frontend with npm

  cd frontend
  npm install 
  npm start

Install the backend with npm

  cd backend
  npm install 
  node index.js

Demo

CPT2303141817-1523x733

About

One-stop CSV manager for easy access to csv data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published