Skip to content
MyAppBuilder
StableGuide

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

SourceReadsWritesCredentials
PostgreSQLYesYes, unless mapped read-onlyConnection string stored as a secret
SupabaseYesYes, unless mapped read-onlyProject URL plus API key stored as a secret
REST APIYes (a GET endpoint returning a JSON list)No, always read-onlyOptional bearer token stored as a secret

MySQL and Airtable are not available yet.

1. Connect

  1. Open Data → Data sources and click Connect data source.
  2. Choose the type and give it a name.
  3. 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).
  4. 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.
  5. 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).
  6. 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

  1. Create the entity with the fields you want to show, then open its Source tab.
  2. Choose the data source and click Load tables.
  3. Pick the Table and the Primary key column.
  4. Map each field to a column (empty mappings default to the field key). Only non-system fields are mapped.
  5. Decide Read-only. REST sources are always read-only.
  6. 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

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.

Related

Was this helpful?