Supabase
This article covers all the required steps to to connect to and query a Supabase Postgres database through Workspace. This enables you to:
- Analyze the data in the Supabase database, like user growth or daily number of sessions. Which data or processes you want to analyze will depend on the application that Supabase is powering.
- Automate reporting: you can use the "Schedule run" functionality to rerun your analysis on a schedule so that your report always takes in the latest available data as your app is being used.
The steps below and some sample code are also available in this workspace (click this link to create your own copy).
If you don't have a Supabase project yet, go to [supabase.com](https://supabase.com, create a free account, start a new project, and follow all the instructions. When setting a database password, make sure to store it somewhere, as you'll need to use this in the next step.
Every Supabase project is powered by a Postgres database. To find the credentails of this database, from the Supabase dashboard, click the cog icon ("Settings") and select "Database". You'll see all the credentials you need:

Locate your Supabase Postgres database credentails
In Workspace, head over to your databases overview, click "Connect a database" and select "Postgres".
Configure the connection:
- Database connection name can be anything; give it a meaningful name.
- Hostname, port, database and username: copy these over from the credentials you found in Supabase in the previous step.
- Password: Set this to the password that you provided when setting up the Supabase project in the first step.
- Make sure to check "Encrypt connection".
Click "Connect".

Set up Supabase postgres database connection credentials in Workspace
You're all set now!!
- Create a new workspace.
- Write and execute a query, e.g.
SELECT * FROM auth.sessions

Write and execute a query through a SQL cell
Last modified 1mo ago