Skip to content
/ csvq Public

Glue for manipulating CSV files in shell pipelines

Notifications You must be signed in to change notification settings

dariusf/csvq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full SQL for manipulating CSV files in shell pipelines.

Installation

pip install git+https://github.com/dariusf/csvq.git

Requires sqlite3 on the PATH.

Usage

csv a.csv -q 'select * from a'

This runs an SQL query on the given file(s) and writes CSV to stdout.

  • Files map to tables and are expected to have headers
  • Table and column names are snake_cased so they don't have to be quoted
  • Column types are guessed from the first row
  • id and *_id columns are indexed

If you need to perform more than a single query, load your data into SQLite:

csv a.csv

About

Glue for manipulating CSV files in shell pipelines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages