Skip to main content
  • Self-hosted: Available for all versions with unlimited connections
  • Cloud: Available for Enterprise plan only (20 connections limit)
Teable allows you to connect to its underlying PostgreSQL database through external tools for read-only queries. This enables integration with BI tools (PowerBI, Metabase, Superset), database clients (DataGrip, Navicat, TablePlus), low-code platforms (Appsmith, Budibase), and application code.

Creating a Database Connection

  1. Open a Table: First, open any table within the base you want to connect to.
  2. Enter Design Page: Click the ⚙️ icon in the top right corner to enter the Base Design page.
  1. Find Database Connection Panel: In the Design page, locate the “Database Connection” panel.
  2. Create Connection: Click create, and the system will automatically generate a read-only PostgreSQL connection with username, password, and host address.

Connecting to the Database

Use the credentials to connect through your preferred tool. Here’s an example: Connection example

Querying Data

Once connected, you can query data using SQL:
SELECT * FROM "bseamGnQT65TVSCzIaC"."clients" LIMIT 100
Note: In PostgreSQL, use double quotes " around schema and table names to preserve case sensitivity. To write this query, you’ll need to know three things:
  • Schema name (BaseId): The base identifier starting with bse
  • Table name: The physical table name in PostgreSQL
  • Field names: The actual column names in the database
The following sections explain how to find each of these.

Finding the BaseId (Schema Name)

Each Base in Teable corresponds to a schema in PostgreSQL. The BaseId is the schema name used in SQL queries. Method 1: Look at the URL - the string starting with bse is the BaseId. baseId Method 2: In the Base Design interface, the schema name shown is the BaseId. Design page

Finding Table Names

Table names in Teable interface don’t automatically sync with physical database table names. Check the Base Design Interface for the actual database table name. table info Tip: You can modify the physical table name in the design interface if needed.

Finding Field Names

Field (column) names in the database may differ from the Teable interface. Check the dbFieldName in the design interface. db field name Tip: Changing field names in Teable won’t sync automatically. Modify dbFieldName explicitly to change the actual column name in PostgreSQL.

System Fields

Teable automatically creates these system fields (cannot be renamed):
FieldDescription
__idUnique ID
__versionVersion number
__auto_numberAuto-incrementing number, primary key
__created_timeCreation time
__last_modified_timeLast modified time
__created_byCreator ID
__last_modified_byLast modifier ID
__row*View index fields, used to maintain record order
__fk*Foreign keys for relationship fields

Junction Tables

Tables starting with junction_ are system-generated tables for handling ManyToMany and unidirectional relationships.

Permission Notes

The database connection is scoped to the current base only. PostgreSQL schemas provide permission isolation, ensuring you can only access tables within your base. You may see other baseIds (schema names) when connecting, but you cannot access their content. base id in TablePlus

Connection Limits

Default limit is 20 concurrent connections.

Writing Data

Teable does not allow direct database writes through external connections. To modify data, use the Teable API instead.

Closing the Connection

In the Database Connection panel, click delete to close the connection. The old password will be cleared, and creating a new connection will generate new credentials.
Last modified on December 23, 2025