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

Setting up DuckDB/Rust

Here's what I did to get DuckDB/rust going on my system. Prerequisites We need two things from DuckDB: header files (so we can build duc...