HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dinedal
textql
Go2014–2024
dinedal / textql

textql

Execute SQL against structured text like CSV or TSV

25Distinct people
34Mentions
1Explicit recommenders
9.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Execute SQL against structured text like CSV or TSV

GitHub

Where it is used

The source check is incomplete. Verified examples will appear here.

What people are saying

As the author of textql ( https://github.com/dinedal/textql ) - thanks for the shoutout! Looks great, I love more options in the space for CLI based data analysis tools!…

dinedal used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year34 dated mentions

Observed mentions: 2014-02-04 06:18:22 UTC to 2024-10-08 08:58:45 UTC.

02462014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC716
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC404
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC110
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC312
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC523
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC404
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC404
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
TextQL Allows you to easily execute SQL against structured text like CSV or TSV. Example session: Major changes! In the time since the initial release of textql, I've made some improvements as well as made the project much more modular. There've also been additional performance tweaks and added functionality, but this comes at the cost of breaking the original command-line flags and changing the install command. Changes since v1 Additions: Numeric values are automatically recognized in more cases. Date / Time / DateTime values are automatically recognized in reasonable formats. See Time Strings for a list for accepted formats, and how to convert from other formats. Added join support! Multiple files / directories can be loaded by listing them at the end of the command. Directories are read by reading each file inside, and this is non-recursive. You can list as many files / directories as you like. Added flag '-output-file' to save output directly to a file. Added flag '-output-dlm' to modify the output delimiter. Added "short SQL" syntax. For the case of a single table, the FROM [table] can be dropped from the query. For simple selects, the SELECT keyword can be dropped from the query. This means the v1 command textql -sql "select * from tbl" -source some_file.csv can be shortened to textql -sql "*" some_file.csv Changes: The flag '-outputHeader' was renamed to '-output-header'. Removals: Dropped the ability to override table names. This makes less sense after the automatic tablename generation based on filename, joins, and shorter SQL syntax changes. Removed '-source', any files / paths at the end of the command are used, as well as piped-in data. Bug fixes: Writing to a directory no longer fails silently. Key differences between textql and sqlite importing sqlite import will not accept stdin, breaking unix pipes. textql will happily do so. textql supports quote-escaped delimiters, sqlite does not. textql leverages the sqlite in-memory database feature as much as possible and only touches disk if asked. Is it any good? Yes Requirements Go 1.4 or later Install Latest release on Homebrew (OS X) brew install textql Build from source go get -u github.com/dinedal/textql/... Docker First build the image. docker build -t textql . Now use that image mounting your current directory into the container. docker run --rm -it -v $(pwd):/tmp textql [rest_of_command] Alias You can add the following alias to your system to provide quick access to TextQL: alias textql='docker run --rm -it -v $(pwd):/tmp textql ' AUR Using an AUR-Helper yaourt textql-git Building from PKGBUILD First clone the repository. makepkg -cs Then install the package using pacman or your favorite Package Manager Usage textql [-console] [-save-to path path] [-output-file path] [-output-dlm delimter] [-output-header] [-pretty] [-quiet] [-header] [-dlm delimter] [-sql sql_statements] [path ...] -console After all statements are run, open SQLite3 REPL with this data -dlm string Input delimiter character between fields -dlm=tab for tab, -dlm=0x## to specify a character code in hex (default ",") -header Treat input files as having the first row as a header row -output-dlm string Output delimiter character between fields -output-dlm=tab for tab, -dlm=0x## to specify a character code in hex (default ",") -output-file file Filename to write output to, if empty no output is written (default "stdout") -output-header Display column names in output -quiet Suppress logging -pretty Pretty print output -save-to file SQLite3 db is left on disk at this file -sql string SQL Statement(s) to run on the data -version Print version and exit I want stdev, average, other functions Just follow the install directions at go-sqlite3-extension-functions and textql will automatically load this library. Full function list: Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter. Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile License New MIT License - Copyright (c) 2015, 2016 Paul Bergeron http://pauldbergeron.com/ See LICENSE for details
Read the full README on GitHub

What Hacker News says

34 sources
Great to see SQL being used more for such use cases! (I really like SQL) This looks nice, especially with the charting! It's good to know though that there are a few similar open source tools already: - q[0] - SQL on CSV and TSV - TextQL[1] - SQL on CSV and TSV - Datasette[2] - Running SQL on various datasets in various formats, by (if I understand it correctly) importing it to sqlite and running the query there. This one's the closest one to the posted project I think, with interactive data exploration and publishing built in. - OctoSQL[3] - SQL on files like CSV, JSON as well as non-file databases, endless streams with temporal SQL extensions and joining everything together in a single query. The performance numbers of this tool however are impressive if they will check out with real data. 1GB in 10 seconds is fast. However, looking at
Read the rest
the documentation it looks like most of the heavy lifting is done by SQLite under the hood. From the docs: > Under the hood, Superintendent loads CSVs into a SQLite database. Disclaimer: I'm the author of OctoSQL. Still actively developing a rewrite on the redesign branch. [0]: https://github.com/harelba/q [1]: https://github.com/dinedal/textql [2]: https://datasette.io [3]: https://github.com/cube2222/octosql
In Show HN: Work with CSV files using SQL. For data scientists and engineers
You can do this with https://github.com/dinedal/textql as well, and a little easier as you don't need to import the data explicitly. SQL_QUERY=<<-EOS SELECT category.name AS category, composition.key, composition.composer, composition.name AS composition, concert.name AS concert FROM category, concert, composition, program WHERE julianday(concert.date) < julianday('now') AND composition.category = category.name AND program.key = composition.key AND program.date = concert.date ORDER BY category.sequence, composition.key ; EOS textql --header --dlm=tab --sql $SQL_QUERY category.tsv composition.tsv concert.tsv program.tsv
In Show HN: SQLite query inside a Bash function
In An introduction to data processing on the Linux command line
There're lots of tools in this space that are similar in a very general way, but have widely different design choices. My tookit is https://github.com/dkogan/vnlog It's tsv-utils-like, but is strictly a wrapper around existing tools. So filtering and transformations are interpreted literally as awk (or perl) expressions. And the various cmdline options match the standard tool options because they ARE the standard tools. So you get a very friendly learning curve, but something like tsv-utils is probably faster and probably more powerful. And it looks like tsv-utils references fields by number instead of by name. Many of the others (mine included) use the field names, which makes a MAJOR usability improvement. Other tools in no particular order: https://csvkit.readthedocs.io/ https://github.com/johnkerl/miller https://github.com/eBay/tsv-ut
Read the rest
In TSV Utilities: Command line tools for large, tabular data files
I've been noticing more swiss army-knife-like cli tools in the last few years. It would be cool if there were some that could support avro/parquet/orc formats. This one is notable because it's written in D lang by a mega corp. Some useful cli data wrangling tools -- https://github.com/BurntSushi/xsv https://github.com/dinedal/textql https://github.com/n3mo/data-science https://stedolan.github.io/jq/ https://gitlab.redox-os.org/redox-os/parallel https://github.com/willghatch/racket-rash Would you have any others you recommend?
In TSV Utilities: Command line tools for large, tabular data files
In Show HN: UXY – adding structure to Unix tools

Showing the 15 most recent of 34 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.