Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koppen/csv_query
Command line tool to query CSV data using SQL
https://github.com/koppen/csv_query
Last synced: 11 days ago
JSON representation
Command line tool to query CSV data using SQL
- Host: GitHub
- URL: https://github.com/koppen/csv_query
- Owner: koppen
- License: mit
- Created: 2012-11-05T09:25:22.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2022-01-13T10:20:11.000Z (almost 3 years ago)
- Last Synced: 2024-02-13T02:06:32.681Z (9 months ago)
- Language: Ruby
- Size: 47.9 KB
- Stars: 24
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
CSV Query - Use SQL to query CSV data
=====================================CSV Query is a command line tool that allows you to run SQL queries on data
stored in CSV files.For example:
$ csvq --select "count(*)" --where "name='Jakob'" sample.csv
count(*)
--------
1[![Build Status](https://secure.travis-ci.org/koppen/csv_query.png?branch=master)](https://travis-ci.org/koppen/csv_query) [![Code Climate](https://codeclimate.com/github/koppen/csv_query/badges/gpa.svg)](https://codeclimate.com/github/koppen/csv_query)
Assumptions
-----------The first row of data is assumed to be headers.
All fields are created as `VARCHAR(255)`, which hopefully works for most cases.
Behind the scenes
-----------------CSV Query loads the CSV data into an in-memory SQLite database. Thus, the SQL
queries need to be SQLite-flavored where applicable.Alternative/related projects
----------------------------* [csvq.py - Python variant that does almost the same thing](http://www.gl1tch.com/~lukewarm/software/csvq/)
* [CSVql - A query language for CSV files](https://github.com/ondrasej/CSVql)License
-------Licensed under the MIT License. See LICENSE for details.