Through Coefficient’s Supabase integration, you can pull your database data straight into Google Sheets or Excel without exporting CSVs or relying on engineering support. Import by selecting tables and columns, write custom SQL queries for more control, or use our AI SQL Builder to generate queries from a plain-English description.
Once your data is in your spreadsheet, you can schedule automatic refreshes, take snapshots to track changes over time, and set up automations so your reports stay current. 🚀
Schedule your Import, Snapshots, and Add Automations
Connecting to Supabase
When you begin a Supabase import for the first time, you will need to go through a few steps to connect Supabase as a data source for Coefficient.
ℹ️ NOTE: Coefficient will need the following information: Host, Port, Database Name, Username, and Password.
|
1. Open the Coefficient Sidebar and click Menu. |
2. Select “Connected Sources”. |
3. Select “Add Connection” at the bottom and then “Connect” to Supabase. |
|
4. Enter the required credentials (Host, Port, Database Name, Username, and Password). |
5. If your database is behind a firewall, you will need to whitelist (ALL 3) Coefficient's server IP addresses. (34.217.184.131, 44.234.233.60, 52.32.132.51). Click "Connect" when done. |
6. You will then be presented with the option to share this connection with other members of your team who also use Coefficient. Your credentials will NOT be shared with your team. 🎉 |
Advanced Settings
When setting up or modifying your Supabase connection, you can enable advanced settings to select a specific schema or configure SSH Tunnel encryption.
Visible Schemas
By default, all schemas appear when you create an import. If your database contains many schemas, you can improve load times by showing only a subset.
ℹ️ NOTE: You can select schemas after you have connected your database. Follow the steps below to limit the schemas visible on the Supabase connection.
|
1. Open the Coefficient Sidebar and click Menu. |
2. Select “Connected Sources”. |
3. Select your Supabase connection.
|
|
4. Beside the Connection details, click on the "edit" hyperlink. |
5. In the edit connection screen, click the "Advanced Settings" dropdown, and in the Schema visibility field, choose the schema you want to use for your data source connection. Click Save once completed. ℹ️ NOTE: To learn more about SQL Schema Limits, click here. All Schemas are shown by default. |
SSH Tunnel
If your database server requires an SSH Tunnel for encryption, enable this option and enter your credentials on the connection screen.
|
1. In the connection screen, toggle the "Use SSH Tunnel" on and enter your SSH credentials:
|
Import from Supabase
There are a few ways to import data from Supabase into Coefficient: from Tables & Columns, from a Custom SQL Query, and from AI SQL Builder.
Importing from Tables and Columns lets you create imports without writing SQL. Using a Custom SQL Query gives you more flexibility in the data you import into Coefficient. Lastly, you can prompt Coefficient's AI to automatically build the SQL query for you. 🤯
Import from Tables & Columns
Table Mode:
|
1. From the sidebar, select “Import from…”. |
2. Select “Supabase” from the list. |
3. Select "From Tables & Columns". |
4. The Import Preview window opens, showing all the table schemas from your Supabase database. Select the table or view for your import (e.g., dummy_data), then click "Next".
5. After selecting a table, you can either proceed to import using the Table mode or Pivot mode. For this import, we'll use the Table mode.
ℹ️ NOTE: The Import Preview shows only a sample of your data (50 rows). This sample data will update if you change the import criteria.
6. The fields will populate a list on the left side. You can check or uncheck fields to include or exclude them in your import. You can drag and drop column headers to reorder them in your import.
7. Customize your import by adding filters and row limits as needed. When done, click “Import”.
8. Congratulations on your first Supabase import using Tables & Columns (Table Mode)! 🎉
Pivot Mode:
|
1. From the sidebar, select “Import from…”. |
2. Select “Supabase” from the list. |
3. Select "From Tables & Columns". |
4. The Import Preview window opens, showing all the table schemas from your Supabase database. Select the table or view for your import (e.g., dummy_data), then click "Next".
5. Click the "Pivot" tab to switch your view and to import your data into a pivot table.
6. Add Rows, Columns, and Values on the left side of the import. You can drag and drop the fields to easily manage the pivot.
7. Customize the import by adding filters or ticking the checkbox to include the Grand Total. Click "Import" when you're finished editing.
8. Congratulations on your first Supabase import using Tables & Columns (Pivot Mode)! 🎉
Import from Custom SQL Query
|
1. From the sidebar, select “Import from…”. |
2. Select “Supabase” from the list. |
3. Select "Custom SQL Query". |
4. The Import Preview window opens, allowing you to enter your custom SQL query in the blue text box shown below. For further flexibility, you can use Coefficient’s SQL Parameters feature to point a value to a specific cell/range of cells for your query.
ℹ️ NOTE: Whenever you make changes to your query, you need to click "Refresh Preview" to update the sample data shown in the preview window.
5. You will be prompted to give your import a name. The name MUST be UNIQUE, as it will also be the tab name in your Google Sheets/Excel file after import. (You can always change the name later if needed.) Click Import once completed.
6. Congratulations on your successful Supabase Custom SQL import with Coefficient! 🎉
Import from AI SQL Builder
|
1. From the sidebar, select “Import from…”. |
2. Select “Supabase” from the list. |
3. Select "AI SQL Builder". |
4. Select your database schema and enter your prompt/query in the "Describe what you want to query" box (example: "Fetch all data with a country code of CA and salary is more than 50000"). Then, click "Generate SQL".
ℹ️ PRO TIP: Be specific when entering your prompts so the AI can easily understand your requirements and provide more accurate results.
5. The AI SQL Builder will automatically generate and write the SQL query for you in the blue text box. Sample data for your query results is shown at the bottom (the first 50 rows are displayed). Click "Import" when done.
6. You will be prompted to give your import a name. Remember, it MUST be UNIQUE, as it will also be the tab name in your Google Sheets/Excel file when imported. (You can always change the name later if needed.) Click Import once completed.
7. Congratulations on your Supabase import using Coefficient's AI SQL Builder! 🎉
Schedule your Import, Snapshots, and Add Automations
Once you have pulled your data into your spreadsheet using Coefficient, you can set up the following: