1
1
mirror of https://github.com/harelba/q.git synced 2024-10-03 22:39:52 +03:00
q - Run SQL directly on delimited files and multi-file sqlite databases
Go to file
Harel Ben-Attia 9554aec8d1 bump to 2.0.8
2019-12-21 15:37:35 +02:00
config Pyci integration 2019-07-20 21:35:08 +03:00
dist Remove 'dist' from .gitignore - it contains important instructions 2019-07-20 21:45:51 +03:00
doc Pyci integration 2019-07-20 21:35:08 +03:00
examples Pyci integration 2019-07-20 21:35:08 +03:00
q bump to 2.0.8 2019-12-21 15:37:35 +02:00
.gitignore Remove 'dist' from .gitignore - it contains important instructions 2019-07-20 21:45:51 +03:00
.travis.yml wip 2019-11-05 14:36:14 +02:00
AUTHORS Pyci integration 2019-07-20 21:35:08 +03:00
do-manual-release.sh bump to 2.0.8 2019-12-21 15:37:35 +02:00
LICENSE Create LICENSE 2017-08-12 13:07:52 +03:00
Makefile fix pyci version 2019-12-16 20:22:03 +02:00
pytest.ini Pyci integration 2019-07-20 21:35:08 +03:00
README.md wip 2019-11-13 10:25:31 +02:00
run-q-linux partial - wip - should probably be reverted 2019-11-26 23:39:33 +02:00
setup-pyenv.sh Pyci integration 2019-07-20 21:35:08 +03:00
setup.py partial - wip - should probably be reverted 2019-11-26 23:39:33 +02:00
test-requirements.txt Makefile refactoring 2019-07-20 22:18:44 +03:00
THANKS Added thanks note 2019-07-27 10:55:05 +03:00

Build Status PyCI release

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.

Change log

Click here to see the change log.

Contact

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

Harel Ben-Attia, harelba@gmail.com, @harelba on Twitter

q on twitter: #qtextasdata