TEXTQL(1)

πŸ“¦
version 2.0.3 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– TEXTQL β€” the textql(1) manual, bestie edition πŸ’–

okay so. you know how you have a whole CSV just sitting there and you're like "I wish I could just SQL at this"? yeah. textql is that. it runs SQL queries on structured text. it's giving main character energy. let's go πŸ¦‹


✨ NAME ✨

textql β€” execute queries on structured text πŸ’…


🌸 SYNOPSIS 🌸

textql [-save-to path] [-output-file path] [-output-dlm delimter]
[-output-header] [-header] [-dlm delimter] [-source path] [-sql
sql_statements] [-quiet] [path...]
textql -console path...

πŸŽ€ DESCRIPTION πŸŽ€

okay so textql executes the statements you give it in SQL on structured texts and hands you back the result. the SQL statements it accepts are ANSI SQL compatible, and they get executed against your data in the order you provided them. and here's the tea: no transformations are applied to the text files themselves β€” instead they're applied to a temporary view of the data. so statements that insert data or modify existing data? their effects only show up in the output. πŸ™ˆ

the argument list at the end is expected to be a list of paths, which may or may not be specific files. each path is traversed for files that then get loaded as part of the database textql creates internally, and files are loaded without traversal. paths provided are not recursed. periodt.

each statement is then executed against textql's internal database and the result, if any, is printed. INSERT, UPDATE, DELETE or other side-effecting statements do not affect the text files you gave as input β€” they instead modify the database internal to textql. their result may be viewed via the output, persisting the database as-is with -save-to, or in a SQLite REPL with --console πŸ”₯

and if you run it with no arguments at all? textql will print a brief overview of its usage. it's literally just vibing. πŸ’œ


🧚 FILES 🧚

structured text accepted by textql is any text file in a tabular format where each row of the table is on a single line, and each column is a section of the line delimited by a single character which is consistent throughout the file. a common structured text format is CSV (RFC4180). iykyk 🌈


πŸ‘‘ OPTIONS πŸ‘‘

  • -console β€” after all statements are run, open a 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 β€” surpress logging 🀫
  • -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 πŸ‘‘

textql is Copyright (C) 2015, 2016 Paul Bergeron http://pauldbergeron.com/


and that's the whole page, bestie πŸ’– this was the textql(1) manual, December 2015 edition, and yes the footer really did say TEXTQL(1) again β€” iconic of it, honestly. go query some text. slay. 🌟