Get support for kieranja/hubdbsql
If you're new to LTH, please see our FAQ for more information on what it is we do.
Qualified Helpers
kieranja
*This user needs to complete their payout settings before they can accept help requests
kieranja/hubdbsql
what?
I'm working with some fairly verbose hubdb tables and I needed a more efficent way of working with the data/exporting data.
This simply creates a SQLlite table from your data and allows you to query it via the cli.
Currently it exports all tables from your portal. If you have PII be careful and make sure you cleanup/dont use this tool.
- create a .env file based on .env.example with your API key
- run the intial setup (pulls all hubdb tables down, so try not to do this yet if you have PII in your hubdb tables)
$ node index.js setup
- query until your heart is content
node index.js "SELECT * FROM table WHERE hs_id=x"
- you can export to CSV, or JSON too:
node index.js "SELECT * FROM table WHERE status in ("x", "x")" --output=csv > rows.csv
node index.js "SELECT * FROM table WHERE status in ("x", "x")" --output=json > rows.json
- enjoy sql past-times with joins:
node index.js "SELECT * FROM table1 INNER JOIN table2 ON (table1.x = table2.x)"
things i may do:
- support more hubdb row formats (currently it's only simple formats, TEXT and NUMBER)
- cleanup code
- work with in memory sqllite
- maybe allow writes?
- ~20. be a good developer and write tests
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2