Friday, April 21, 2023

Simple DuckDB Interface

I'm starting to collect some useful DuckDB stuff here: 

    https://github.com/marhar/duckdb_tools

The first tool is duckwatch, which allows you to edit a SQL file and see the output continuously updated in another window.  It's a poor programmer's IDE!

You can run it a couple of ways:

$ duckwatch [-e] my-file.sql.        # runs your commands in a transient db.
                                     # every time you save your sql file, the
                                     # file is re-executed from scratch.
$ duckwatch [-e]my-file.sql my.db.   # same, but runs it using this db file.
                                     # changes are persistent.
$

Running with "-e" pops open a new window and puts you in an editor.  If you don't want that, just edit the sql file in your favorite editor, and whenever you save the file the SQL code will be re-executed.



No comments:

Post a Comment

Duck-GPT -- Adding DuckDB Documents to an LLM

tl;dr: An LLM that is up to date on DuckDB! tl;dr2: My Hello World project for integrating new data into an existing language model. Chat GP...