Data sources
By default every entity is stored in the built-in database : hosted, backed up and secured for you, with separate test and live data. When your records already live elsewhere, you can connect an external data source — a PostgreSQL database, a Supabase project or a REST API — and
By default every entity is stored in the built-in database: hosted, backed up and secured for you, with separate test and live data. When your records already live elsewhere, you can connect an external data source — a PostgreSQL database, a Supabase project or a REST API — and map an entity to one of its tables. The pattern is connect → map → query: connect once, map each entity to a table and its columns, and your pages query it like any built-in entity.
When to use
Connect an external source when a system of record already exists and must stay where it is (an ERP database, a product catalogue API). Keep the built-in database for everything you create in MyAppBuilder.
Supported sources
| Source | Reads | Writes | Credentials |
|---|---|---|---|
| PostgreSQL | Yes | Yes, unless mapped read-only | Connection string stored as a secret |
| Supabase | Yes | Yes, unless mapped read-only | Project URL plus API key stored as a secret |
| REST API | Yes (a GET endpoint returning a JSON list) | No, always read-only | Optional bearer token stored as a secret |
MySQL and Airtable are not available yet.
1. Connect
- Open Data → Data sources and click Connect data source.
- Choose the type and give it a name.
- PostgreSQL: choose whether to Require SSL. Supabase: enter the Project URL. REST: enter the List URL and, if the list is nested in the response, the Items path (for example
data.items). - Enter the secret name that will hold the credentials (capital letters, digits and underscores, for example
COMPANY_DATABASE_URL) or accept the suggestion. Credentials themselves are never stored in your app definition — only this name. - Click Add data source, then open Settings → Environment & secrets and set the secret's value for Development (used by test data) and Production (used by live data).
- Back on the Data sources tab, click Test connection. A green Connected badge confirms it and loads the list of tables.
2. Map an entity
- Create the entity with the fields you want to show, then open its Source tab.
- Choose the data source and click Load tables.
- Pick the Table and the Primary key column.
- Map each field to a column (empty mappings default to the field key). Only non-system fields are mapped.
- Decide Read-only. REST sources are always read-only.
- Click Map …. The entity badge changes to External · name, and its Records tab now reads from the table.
Unmap on the Source tab returns the entity to the built-in database; nothing is deleted in the external table.
3. Query
Pages, forms and the records editor work as usual. Writes go to the external table when it is not read-only; validation, uniqueness checks, permissions and own-records rules still apply. Up to 1,000 rows are read per query, and relationship checks only apply to built-in entities.
Publish checklist
Publishing fails while a PostgreSQL or Supabase source's secret is missing for the target environment, or when an entity is mapped to a source that no longer exists. Remove a source only after unmapping its entities.
Example
Data source: "Company database" · PostgreSQL · secret COMPANY_DATABASE_URL · SSL on Entity Products → Source: Company database · table public.products · primary key sku Name → name · Price → unit_price · In stock → stock_qty · Read-only on Page: Product catalog (cards) bound to Products
Common mistakes
- Pasting the connection string into the data source: it belongs in Settings → Environment & secrets under the secret name.
- Testing before the secret is set: the test uses the Development secret; set it first.
- Expecting live data to use the Development secret: live uses Production; set both.
- Mapping a REST source and adding a form: REST is read-only; use an API action to write.