Documentation

    Supabase

    Read Supabase tables and views into a Strata flow, and write results to tables. Reads use the Data API. Writes use a direct PostgreSQL connection.

    Before you start

    • Your project URL and an API key. A secret key sees everything and bypasses row-level security. A publishable key sees only what your policies allow.
    • To write: a PostgreSQL connection string with your database password. Use the Session pooler string, under Connect in Supabase.
    • Connections come from Oplema's servers, not your browser. If your project has network restrictions, they must allow them. Oplema doesn't promise a fixed IP address; contact us if you need to allowlist.

    Decide now whether you'll write. A saved connection cannot be edited, so adding the connection string later means deleting the connection and creating it again.

    Connect

    1. In Strata, select an Input block to read, or an Output block to write.
    2. Set Source to Connectors. On an Output block the same control is Destination.
    3. In the connector dropdown below it, choose Supabase.
    4. Open the Connection dropdown and choose Create new connection.
    5. Fill in these fields. https://xxxx.supabase.co: project URL. sb_secret_… or service_role key: API key; publishable and legacy anon keys are accepted too. It is shown as you type. postgresql://… (optional for Input, required for Output): connection string. It contains your database password, which is also shown as you type.
    6. Set Name (optional). Without a name, the connection is labeled with the project reference.
    7. Select Save connection.

    The new connection is selected. Saving only checks the format of what you typed. It doesn't sign in, so wrong details first show up as an error when the pickers below load.

    A saved connection can't be edited. To change a password, token or any other field, open the Connection dropdown, choose Delete (the ×) on its row, and create the connection again. Blocks that used the deleted connection must then select the new one.

    Read

    SettingWhat it does
    Table or viewThe ones your project's Data API exposes.
    ColumnsAll columns or Selected columns.
    Date column, From and ToOptional. These are inclusive whole days. Zoned timestamps use UTC.
    API schemaUnder Advanced. Blank uses the Data API default. Another schema must be exposed through the Data API.

    Select Refresh data to read again. Oplema reads 1,000 rows per request.

    Write

    Pick Schema (default public), then Table. Supabase-managed schemas are hidden.

    • Create new table: enter a Table name, default output. New tables turn on row-level security, revoke access from public, anon and authenticated, and grant SELECT to service_role. Your app's users see nothing until you add policies and grants.
    • An existing table: set Write to Replace or Append rows. Replace runs TRUNCATE in one transaction and fails if row-level security applies to the login.

    Output writes when you run the flow. Choosing tables in the panel never writes. If you pick Create new table and a table with that name already exists, the run fails. Writing to a custom schema doesn't expose it to the Data API.

    Limits and billing

    • Reads: the first 50 MB of each download is free. After that, each download costs $0.01 per GB from your usage. Failed reads aren't charged, and a read stops when your usage runs out.
    • Writes: the first 50 MB of each write is free. After that, each write costs $0.01 per GB from your usage, and a write stops when your usage runs out.
    • Your Supabase plan's own limits also apply.

    See Billing for who pays and how usage works.

    Troubleshooting

    MessageWhat to do
    project URL must be https://<ref>.supabase.coUse the URL exactly in that form, with no path.
    expected a publishable, secret, or legacy anon/service_role keyCheck you pasted the whole API key.
    expected a PostgreSQL connection string with a host, user and passwordReplace the [YOUR-PASSWORD] placeholder with your database password.
    Supabase Output requires a PostgreSQL connection string. Open Supabase Connect > Session pooler and use your database password.This connection has no connection string. Delete it and create it again with one.
    Supabase: the PostgreSQL connection must use this project's direct or pooler endpoint and postgres databaseUse a string from this project's Connect panel.
    Supabase: HTTP 401. Check the connection's API key.Delete the connection and create it again with a valid key.
    Supabase: HTTP 403. The connection cannot read this schema or table.Use a secret key, or add policies and grants.
    Supabase: missing Data API schema. Use a secret key and expose the schema through the Data API.Expose the schema, or use a secret key.
    Supabase: replace is unavailable while row-level security applies to this connectionUse Append rows, or a database login that bypasses row-level security.
    Supabase: empty replacement is blocked; existing data was preservedThe incoming table has no rows. Check the flow upstream.
    Supabase: write completion could not be confirmed. Check the destination before running again.The connection dropped during the write. Look at the table first, because a retry could write the rows twice.
    This transfer exceeds the free 50 MB and the available usage creditsThe read or write passed 50 MB and your usage ran out. Add usage, or move less data.

    Prepare your data. Build it in Strata.

    Strata opens in your browser, with no account.