Skip to content
/ q Public
forked from harelba/q

q - Run SQL directly on CSV or TSV files

License

Notifications You must be signed in to change notification settings

qxcv/q

This branch is 2 commits ahead of, 63 commits behind harelba/q:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

29f9c19 · Apr 14, 2020
Apr 14, 2020
Dec 17, 2019
Jan 6, 2019
Dec 27, 2017
Feb 8, 2020
Jan 20, 2020
Feb 1, 2020
Jan 12, 2020
Aug 12, 2017
Jan 12, 2020
Feb 12, 2020
Apr 6, 2017
Apr 6, 2017
Mar 24, 2018
Feb 8, 2020
Dec 1, 2019
Jan 12, 2020
Dec 8, 2018
Jan 12, 2020
Feb 8, 2020
Jan 12, 2020

Repository files navigation

Build Status

q - Text as Data

q is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files).

q treats ordinary files as database tables, and supports all SQL constructs, such as WHERE, GROUP BY, JOINs, etc. It supports automatic column name and type detection, and q provides full support for multiple character encodings.

q's web site is http://harelba.github.io/q/. It contains everything you need to download and use q immediately.

Installation.

Extremely simple.

Instructions for all OSs are here.

Examples

q "SELECT COUNT(*) FROM ./clicks_file.csv WHERE c3 > 32.3"

ps -ef | q -H "SELECT UID, COUNT(*) cnt FROM - GROUP BY UID ORDER BY cnt DESC LIMIT 3"

Go here for more examples.

Python API

A development branch for exposing q's capabilities as a Python module can be viewed here, along with examples of the alpha version of the API.
Existing functionality as a command-line tool will not be affected by this. Your input will be most appreciated.

Contact

Any feedback/suggestions/complaints regarding this tool would be much appreciated. Contributions are most welcome as well, of course.

Linkedin: Harel Ben Attia

Twitter @harelba

Email [email protected]

q on twitter: #qtextasdata

About

q - Run SQL directly on CSV or TSV files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.9%
  • Shell 3.6%
  • JavaScript 1.1%
  • HTML 0.5%
  • Makefile 0.5%
  • CSS 0.3%
  • Batchfile 0.1%