Orcabase-hosted databases
Postgres servers and DuckDB warehouses that Orcabase runs for you: nothing to install, no passwords to manage, and a home for synced data.
No database of your own, or want a home for synced spreadsheets and uploaded files? Orcabase can host one for you. There are two kinds, and you can have both.
Postgres servers and DuckDB warehouses
| Postgres server | DuckDB warehouse | |
|---|---|---|
| What it is | A regular PostgreSQL database | An analytics database, fast on large tables |
| In the app | PostgreSQL | DuckDB |
| Best for | Data your own tools also read and write, and Fivetran syncs | Synced spreadsheets and databases, uploaded files, joining sources |
| Upload files | CSV and TSV (every column comes in as text) | CSV, TSV, Parquet and JSON (column types detected) |
| Sync destination | Fivetran connectors | Google Sheets and MySQL |
| Credentials | A Postgres user and password (admins create users on the server’s page) | The warehouse’s URL and token |
Hosted databases are set up for your organization by the Orcabase team, as part of the data hosting add-on (see Pricing). To add one, message us.
Connect a hosted Postgres server
Start a new data source
Go to Data Sources then New data source and pick PostgreSQL. A hosted server is connected like any other Postgres database.
Fill in the server
Admins can pick one of your organization’s servers under Fill from a platform server, which fills in its host and port. Otherwise copy them from the server’s connection string. Database is usually
postgres, the one every server comes with.Add a user and create it
Enter a Postgres user and its password, then click Create data source. A user that can only read is the safest choice: create one on the server’s Users tab (see below) and give it access to the database.
Note
Hosted data sources added before this change connected as a built-in user with no password. They keep working; the first time you edit one, it asks for a user and password.
Postgres management in admincp Platform admins
Platform admins manage hosted Postgres in admincp → Projects. Open a project to view its resources, live usage, password and connection strings, manage backups, start or stop it, and assign it to an organization. In dash, use Data Sources to connect and Explore to work with your data.
Use the connection strings to point your own app or tools at the server. There are two: Gateway — pooled shares connections, which suits web apps that open many short ones. Gateway — direct is a plain connection, for long sessions, migrations and bulk loads.
Your hosted DuckDB warehouse
When the Orcabase team sets up a DuckDB warehouse for you, we add it to your Data Sources too, as a DuckDB source, ready to use. To add it again yourself, pick DuckDB and enter the warehouse’s query URL and token.
A DuckDB warehouse is where built-in syncs land, and the best place for uploaded files. In Explore you can:
- New schema: make a schema, a folder for tables, before loading data into it.
- Load data: turn a file into a table. See Upload files.
- Profile: on any table, see each column’s type, minimum, maximum, approximate number of unique values, average, spread and share of empty values.
Note
SQL you run against a DuckDB warehouse can create and change tables in it, so you can build tables of your own there. Synced tables are rebuilt on every sync, so keep your own tables in a schema of their own.
Attach a Postgres database to a DuckDB warehouse
A DuckDB warehouse can reach into any Postgres data source in your organization and query it in place. Nothing is copied: the connection is made fresh for each query, and it’s read-only. That lets one query join synced data with your app’s live data.
Open the warehouse in Explore
Go to Explore, select the DuckDB data source, and open its Attachments tab.
Attach
Enter an Alias (a short name like
app), pick the Postgres data source, and click Attach.Query across both
Refer to the Postgres tables as
alias.schema.table:SQL · DuckDBSELECT s.plan, COUNT(*) AS customers FROM app.public.customers AS c JOIN sheets.subscriptions AS s ON s.email = c.email GROUP BY s.plan
Something unclear or missing? Troubleshooting covers the common errors, or message us.