https://github.com/miniql/miniql-csv-example
An example of using MiniQL to make queries against a set of CSV files.
https://github.com/miniql/miniql-csv-example
Last synced: 4 days ago
JSON representation
An example of using MiniQL to make queries against a set of CSV files.
- Host: GitHub
- URL: https://github.com/miniql/miniql-csv-example
- Owner: miniql
- Created: 2020-07-25T03:08:05.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T09:21:14.000Z (about 4 years ago)
- Last Synced: 2025-03-03T18:49:54.533Z (over 1 year ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# MiniQL - CSV files example
An example of MiniQL - the tiny JSON-based query language inspired by GraphQL.
This example shows how to use [miniql](https://www.npmjs.com/package/miniql) and [@miniql/csv](https://www.npmjs.com/package/@miniql/csv) to run queries against a set of CSV files.
Example [Star Wars data is courtesy of Kaggle](https://www.kaggle.com/jsphyg/star-wars/data).
You need [Node.js](https://nodejs.org/en/) installed to run this example code.
Any problems? Please log an issue on this repo.
Love this? Please [star the repo](https://github.com/miniql/miniql) and [support my work](https://www.codecapers.com.au/about#support-my-work)
## Repo contents
```
/miniql-csv-example
index.js -> Example code that runs various queries against the CSV files.
/data
... -> Various CSV files with data from the Star Wars universe.
```
## Setup
[Download a the zip file of this code](https://github.com/miniql/miniql-csv-example/archive/master.zip) or use Git to clone this repository.
Open a terminal, change directory to the repo and install dependencies:
```bash
cd miniql-csv-example
npm install
```
## Run the code
Open a terminal, change directory to the repo and run the code using Node.js:
```bash
cd miniql-csv-example
npm start
```
A bunch of example queries will run and results are displayed in the terminal.
Please read `index.js` to see each example query.
Don't forget to [star the repo](https://github.com/miniql/miniql) and [follow the developer on Twitter](https://twitter.com/codecapers).