All Projects → harelba → Q

harelba / Q

Licence: gpl-3.0
q - Run SQL directly on CSV or TSV files

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Starlark
911 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to Q

Tsv Utils
eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
Stars: ✭ 1,215 (-86.21%)
Mutual labels:  cli, command-line, csv, tsv
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-98.84%)
Mutual labels:  command-line-tool, cli, command-line, csv
Sqawk
Like Awk but with SQL and table joins
Stars: ✭ 263 (-97.01%)
Mutual labels:  cli, csv, tsv, sql
Trdsql
CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.
Stars: ✭ 593 (-93.27%)
Mutual labels:  cli, csv, sql
Ed
A modern UNIX ed (line editor) clone written in Go
Stars: ✭ 44 (-99.5%)
Mutual labels:  command-line-tool, cli, command-line
Cli
A command-line interface for Hetzner Cloud
Stars: ✭ 542 (-93.85%)
Mutual labels:  command-line-tool, cli, command-line
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-96.08%)
Mutual labels:  command-line-tool, cli, command-line
Papis
Powerful and highly extensible command-line based document and bibliography manager.
Stars: ✭ 636 (-92.78%)
Mutual labels:  command-line-tool, cli, command-line
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (-92.9%)
Mutual labels:  command-line-tool, cli, command-line
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (-29.84%)
Mutual labels:  cli, csv, tsv
Csvq
SQL-like query language for csv
Stars: ✭ 804 (-90.87%)
Mutual labels:  command-line-tool, csv, sql
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (-94.45%)
Mutual labels:  command-line-tool, cli, command-line
Node.cli Progress
⌛️ easy to use progress-bar for command-line/terminal applications
Stars: ✭ 466 (-94.71%)
Mutual labels:  command-line-tool, cli, command-line
Csvtk
A cross-platform, efficient and practical CSV/TSV toolkit in Golang
Stars: ✭ 566 (-93.57%)
Mutual labels:  command-line, csv, tsv
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (-47.71%)
Mutual labels:  cli, csv, tsv
Dataproofer
A proofreader for your data
Stars: ✭ 628 (-92.87%)
Mutual labels:  cli, command-line, csv
Terjira
Terjira is a very interactive and easy to use CLI tool for Jira.
Stars: ✭ 713 (-91.91%)
Mutual labels:  command-line-tool, cli, command-line
Laminas Cli
Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
Stars: ✭ 25 (-99.72%)
Mutual labels:  command-line-tool, cli, command-line
Rff Cli Example
An example of how to use 🏁 React Final Form in a CLI application with Ink
Stars: ✭ 55 (-99.38%)
Mutual labels:  command-line-tool, cli, command-line
Define
A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.
Stars: ✭ 298 (-96.62%)
Mutual labels:  command-line-tool, cli, command-line

Build and Package

q - Text as Data

q's purpose is to bring SQL expressive power to the Linux command line and to provide easy access to text as actual data.

q allows the following:

  • Performing SQL-like statements directly on tabular text data, auto-caching the data in order to accelerate additional querying on the same file.
  • Performing SQL statements directly on multi-file sqlite3 databases, without having to merge them or load them into memory

The following table shows the impact of using caching:

Rows Columns File Size Query time without caching Query time with caching Speed Improvement
5,000,000 100 4.8GB 4 minutes, 47 seconds 1.92 seconds x149
1,000,000 100 983MB 50.9 seconds 0.461 seconds x110
1,000,000 50 477MB 27.1 seconds 0.272 seconds x99
100,000 100 99MB 5.2 seconds 0.141 seconds x36
100,000 50 48MB 2.7 seconds 0.105 seconds x25

Notice that for the current version, caching is not enabled by default, since the caches take disk space. Use -C readwrite or -C read to enable it for a query, or add caching_mode to .qrc to set a new default.

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

Usage Examples

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 provides full support for multiple character encodings.

Here are some example commands to get the idea:

$ 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"

$ q "select count(*) from some_db.sqlite3:::albums a left join another_db.sqlite3:::tracks t on (a.album_id = t.album_id)"

Detailed examples are in here

Installation.

New Major Version 3.1.6 is out with a lot of significant additions.

Instructions for all OSs are here.

The previous version 2.0.19 Can still be downloaded from here

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

Patreon: harelba - All the money received is donated to the Center for the Prevention and Treatment of Domestic Violence in my hometown - Ramla, Israel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].