DuckDB

DuckDB is an in-memory analytics database that supports persisting to a file on your local filesystem. Evidence supports connecting to DuckDB as a data source, allowing you to query data using SQL.

Add a New DuckDB Data Source

  1. Start the Evidence dev server: npm run dev or Start Evidence using the VSCode extension.
  2. Navigate to the settings page, also accessible via the ... menu in the top right.
  3. Click the New Source button.
  4. Select DuckDB as the data source type.
  5. Enter the configuration options for the connection.
  6. Click the Test button to confirm the connection is successful.
  7. Click the Save button to save the connection.
  8. Your configuration options are saved in two files:
    • /sources/[source_name]/connections.yaml: Non-sensitive values, source controlled.
    • /sources/[source_name]/connection.options.yaml: Sensitive values, not source controlled, base-64 encoded.

Configuration

If using a persistent database, it should be stored in the directory sources/[your_source_name]/.

See the DuckDB docs for more information.

To connect to MotherDuck, see the MotherDuck data source page.