Supabase
Connect the PostgreSQL database behind your Supabase project, including projects created with Lovable. Qubit reads the tables in one schema, either by copying them on a schedule (Sync Mode) or by querying the database live (Direct Mode).
Before you start
You need your project's Session pooler connection details:
- In Supabase, open your project and click Connect in the top bar.
- Choose Session pooler and note the host, port, database, and user.
- Have the database password ready. You set it when you created the project and can reset it in Supabase's Database settings.
Use the Session pooler host, such as aws-0-eu-central-1.pooler.supabase.com. The direct host (db.<project-ref>.supabase.co) only accepts IPv6 connections, and Qubit cannot reach it.
Connect Supabase
- Open Data Catalog from the sidebar, click Add Data, then choose Connect a database.
- On the New Data Source page, click Supabase. It is under Databases.
- Enter a Connection Name.
- Fill in the connection details:
- Session pooler host: the pooler host from Supabase. You can also paste the full
postgresql://connection string here, and Qubit fills in the port, database, username, and password from it. - Port: defaults to
5432. - Database: defaults to
postgres. - Username: the pooler username, which includes your project ref after a dot, for example
postgres.abcdefghijklmnop. - Database password: the database password. Do not use the
anonorservice_roleAPI keys. - Schema: defaults to
public.
- Session pooler host: the pooler host from Supabase. You can also paste the full
- Under Connection Mode, choose Sync Mode or Direct Mode.
- To connect through an SSH bastion host instead, turn on Connect via SSH tunnel and fill in the SSH fields. The tunnel always uses Direct Mode.
- For Sync Mode, choose a Sync Schedule. The default is Daily.
- Click Create.
Qubit tests the connection before saving it, then takes you to the Data Catalog. In Sync Mode, the first sync starts right away.
If the test fails
The form shows the error message:
- "This is Supabase's direct host, which is IPv6 only": replace the host with the Session pooler host shown under Connect in Supabase, and use the pooler username
postgres.<project-ref>. - "Authentication failed": check the username and the database password.
- "Schema does not exist": check the schema name. Supabase apps usually keep their tables in
public.
For other errors, see PostgreSQL. Supabase uses the same checks.