SQLite query inside a Bash function
Part of the workflow for building my website is the generation of a table in tab-separated column format (.tsv). The source data is found in four other .tsv files. I use an SQLite query to perform a 4-way join and write out the new table. For convenience, I wrote a script that encapsulates the query inside a Bash function. The example below illustrates this technique. repertoire() { pushd $CMM_SOURCES/_data sqlite3 <<EOS .headers on .mode tabs .import category.tsv category .import composition.tsv composition .import concert.tsv concert .import program.tsv program .once repertoire.tsv…
What it does
In the maker’s words, at launch
Part of the workflow for building my website is the generation of a table in tab-separated column format (.tsv). The source data is found in four other .tsv files. I use an SQLite query to perform a 4-way join and write out the new table. For convenience, I wrote a script that encapsulates the query inside a Bash function. The example below illustrates this technique. repertoire() { pushd $CMM_SOURCES/_data sqlite3 <<EOS .headers on .mode tabs .import category.tsv category .import composition.tsv composition .import concert.tsv concert .import program.tsv program .once repertoire.tsv 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 popd }
Does the same job
all alternatives →


- SSSPyQL – SQL with Python in the middle2022 · github.com · ▲105
SPyQL (https://github.com/dcmoura/spyql) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq. How does a SPyQL query looks like? $ spyql “ IMPORT pendulum AS p SELECT (p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago, sum_agg(price…
- SSSQLite-S3-query – Python function to query a SQLite database on S32021 · github.com · ▲38
- SVSQL Viewer – UI for uber/queryparser, written in Haskell2018 · github.com · ▲88
More work this month
the category →


The app store for voice native apps that lives in your notch
Work · 28d ago · voiceos.com

The New Calendly▲211Handle all of the work before, during, and after meetings
Work · 17d ago · calendly.com
Launched alongside, July 2021
the whole month →
Typedream▲1,426No-code site builder, easy as Notion, pretty as Webflow
Dev tools · 2021 · typedream.com


An 8-week founder program inspired by Product Hunt
Life & fun · 2021 · hyper.com

200+ open source alternatives to popular B2B tools
Dev tools · 2021 · btw.so
- SW
Life & fun · 2021 · static.wiki
