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.
POST http://localhost:8080/api/v1/upload-csv
Input | Output | Description |
---|---|---|
form-data |
success: true |
Required."Content-Type": "multipart/form-data" |
Warning: csv file size should be < 1 mb
POST http://localhost:8080/api/v1/columns
Input | Output | Description |
---|---|---|
filename Array |
Columns |
Required."Content-Type": "multipart/form-data" |
example output: ["seller_id","profit","loss","order_id","delivered"]
GET http://localhost:8080/api/v1/data?queryColumn=${queryColumn}
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"
}
]
}
]
Install the frontend with npm
cd frontend
npm install
npm start
Install the backend with npm
cd backend
npm install
node index.js