Skip to content
Beltr documentation home
beltr.ai

Sources and data

Connect a DuckDB file

Add a DuckDB database file written by another program as a read-only source.

A DuckDB file is a database in a single file, written by another program. Beltr reads it as a source. The demo plantDemo plant Havbris Fôr, a made-up fish-feed plant with two extruder lines that ships with Beltr. Its data is synthetic and stays on your computer. is such a source.

  1. In Sources, choose Add source, then DuckDB file and Continue.
  2. Enter a Name and choose Choose DuckDB file…. Beltr accepts a .duckdb, .ddb or .db file outside Beltr’s workspace folders.
  3. If you need them, fill in Schemas to list (one schema per line; empty lists every schema) and Rows per read batch (1 to 65,536; empty uses 10,000). Both are optional.
  4. Choose Test connection. When the test has passed, choose Continue, check the connection and choose Save.

You should see

You should see the overview of the new source, where Beltr starts looking at what is in the file.

A DuckDB file has no password.

The program that writes the file cannot open it while Beltr reads it. The connection test warns about this: “While Beltr reads this file, the program that writes it cannot open it. If that program must keep running, point Beltr at a copy of the file.” Because of this warning, the source’s status reads Connected · check the warnings.

Beltr reads a DuckDB file one operation at a time.

Read-only session is Confirmed, with the sentence “DuckDB opens this file read-only, whatever the file’s permissions allow; every statement is checked by the guard.” When your account may write to the file, Read-only posture adds “The file itself is writable, but Beltr opens it read-only.”

An encrypted DuckDB file, a remote DuckDB database such as MotherDuck, and another Beltr workspace’s own data file cannot be a source.