Skip to content

Database Connections

A connection lets Ciaren read from and write to a database or storage service through the SQL Input, SQL Output, and storage nodes. You define it once on the Connections page and reuse it in as many flows as you like. Each node then picks a table or writes a query. The same page holds the provider API keys for the AI flow assistant.

  1. 1Input
    Database
    PostgreSQL · MySQL · SQLite · SQL Server · MongoDB
  2. 2Input
    Connection
    host · port · user · password secret (never stored)
  3. 3Input
    SQL Input node
    picks a table or runs a custom query
  4. 4Transform
    Transformation nodes
    clean, reshape, combine
  5. 5Output
    SQL Output node
    replace · append · fail if exists
  6. 6Output
    Database
    result written back

Assistant API keys

Assistant API keys sits at the top of the Connections page, above the data connections. These are the provider keys the AI flow assistant uses to build flows from plain language. They are not database connections: no node uses them and flows never read them.

The Assistant API keys section at the top of the Connections page

To add one:

  1. Choose Add API key and name the key.
  2. Pick the provider and a model, or choose Other model… to type a model ID that is not listed.
  3. Set a reasoning effort if the provider offers one.
  4. Paste the key and confirm the storage notice.

Ciaren stores the key in the OS keychain of the computer that runs it and never shows it again. The database keeps only the name, provider, model, effort, and state.

The assistant uses one enabled key at a time. The first key you add is in use, and you select another with its radio button. Clear Enabled to stop using a key without deleting it. The pencil button renames a key, changes its model or effort, or replaces the key. The trash button deletes it from the keychain.

On a server without a supported keychain, such as a container, Add API key is disabled. An administrator supplies the key through an environment variable or a mounted file instead. Connection file: references cannot read those assistant secret files. See Flow assistant for the privacy model, precedence, and server-managed keys, and Set up the AI flow assistant for a first run.

Security model

Ciaren never stores your database password.

A connection stores a secret reference: an environment variable name, a keyring:NAME entry in the OS keychain, or a file: path. The value is read only when the connection is used. It never reaches the database, the API, or exported Python. Connection secrets covers each reference type and the guards around it.

Supported databases

Ciaren keeps the built-in connectors selective so the open core stays light. For niche databases, SaaS products, internal APIs, or proprietary systems, use a connector plugin.

ProviderDriverInstall
PostgreSQLpsycopgpip install "ciaren[postgres]"
MySQL / MariaDBpymysqlpip install "ciaren[mysql]"
SQLitebuilt innone
DuckDBduckdb, duckdb-enginepip install "ciaren[duckdb]"
SQL Serverpyodbcpip install "ciaren[mssql]"
Snowflakesnowflake.sqlalchemypip install "ciaren[snowflake]"
MongoDBpymongopip install "ciaren[mongo]"
Local folderbuilt innone
AWS S3boto3pip install "ciaren[s3]"
Google Cloud Storagegoogle-cloud-storagepip install "ciaren[gcs]"
Azure Blob Storageazure-storage-blobpip install "ciaren[azure]"
REST APIbuilt innone. See REST API connections

To install every database and storage driver at once, run pip install "ciaren[all]".

If a driver is missing, its provider shows as disabled on the Connections page with an install hint. SQLite needs no driver, so it is the quickest way to try things.

SQL Server also needs a system ODBC driver

pip install "ciaren[mssql]" (or EXTRAS=mssql in Docker) installs only pyodbc. You also need the unixODBC driver manager and a SQL Server ODBC driver such as Microsoft's msodbcsql18 at the OS level, or connections fail with "no default driver specified." The official Docker image installs both when you build with EXTRAS=mssql. Outside Docker, follow Microsoft's install instructions for your OS.

Creating a connection

Connections page: list of saved database connections with test/edit actions

The Connections page starts with two built-in connections that back core features. Treat them as defaults rather than connections you created.

  • Local MLflow is the MLflow tracking store (./mlruns by default). The Machine Learning nodes use it to log experiments and register models.
  • Local Storage is a local file store rooted at CIAREN_DATA_DIR. The Storage Input and Output nodes use it for zero-setup file storage.

To add your own:

  1. Go to Connections → Add connection. A provider picker appears.

    Add connection dialog: grid of database and storage providers: PostgreSQL, MySQL/MariaDB, SQLite, DuckDB, SQL Server, Snowflake, MongoDB, Local Folder, AWS S3, Azure Blob Storage, Google Cloud Storage

  2. Pick a provider. The connection form appears.

    Configure connection form: name, host, port, database, username, and a "Password secret" field with a full-width "Store a value in the OS keychain" button beneath it

    SQLite asks only for a file path. Most others ask for host, port, database, username, and the password secret: a reference (an environment variable name, keyring:NAME, or file:/path). You can also use Store a value in the OS keychain to save the value in the keychain from the form. Ciaren never stores the value itself.

    Snowflake differs: it has no port field, and Account identifier replaces host. Warehouse, role, and schema are optional fields of their own.

  3. Save, then click Test to check connectivity.

Connectors from plugins

Plugins can add connectors that Ciaren does not ship: niche databases, SaaS-specific integrations, proprietary stores. After a connector plugin is installed and approved (see Installing & Managing Plugins):

  • its card appears in the Add connection dialog under From plugins, with a Plugin badge;
  • its form comes from the connector's own metadata, and the plugin declares which fields it needs;
  • Test, table or object listing, and the SQL and Storage nodes work as they do for a built-in provider, and secrets use the same references.

Connector Plugins explains how to build one. For a long-tail integration, the preferred contribution is a plugin, or an improvement to the Plugin SDK that makes the plugin possible. Core connector requests are accepted only when the integration is broadly useful and maintainable in the lightweight open core.

Web APIs

The built-in REST API connector reads HTTP JSON or CSV endpoints as tables, with no driver. Options, authentication, pagination, and size limits are in REST API connections.

Use connections in a flow

  • SQL Input: choose the connection, then pick a table (the list is read from the database) or switch to Custom SQL and write a query. Ciaren reads the source live on every run, so a scheduled flow always gets fresh data. Each run saves its inputs as a parquet snapshot, so a run records exactly the data it processed.
  • SQL Output: choose the connection and a target table, and whether to replace, append, or fail if it already exists.
  • MongoDB inputs use collection selection only, with no custom SQL.

Delete a connection

Ciaren refuses to delete a connection that flows still use, and lists those flows. Repoint their SQL or Storage nodes first, or force the delete (the UI asks; the API takes ?force=true). Those flows then fail at run time until you reconfigure them.

Next steps