Open navigation

Database connection guide

Use this guide to connect your SQL database to Supermetrics, and seamlessly add its data to your reports. The database connector is only available in Google Sheets.

Use the database connector to connect to a data source Supermetrics doesn't support at the moment, and also for custom in-house data. Then, transform or combine data before adding it to your reports.

Tables that contain all data in the database and Views that contain the results of a query in a virtual table are supported.

SSH connections and write-specific SQL functions are not supported for the SQL database connector.

Supported database types:

  • MySQL
  • Oracle
  • MariaDB
  • PostgreSQL
  • Microsoft SQL Server
  • Amazon Redshift
  • Google Cloud SQL for MySQL
  • Microsoft Azure SQL

Before you begin

Check the access requirements with your database administrator before using the database connector.

Database connector configuration

Before connecting, make sure you have the following information available:

  • DB type – The database type or technology being used
  • DB address – IP or URL to the SQL server
  • DB port – Port number the server is expecting connections through
  • Database name – Name of the data based to connect to
  • Username – Account that has permissions to access the database
  • Password – Password for the account
  • Use SSL – Setting that allows SSL to be used, if the server connection requires it.

IP allowlisting

To use Supermetrics with your database, your database needs to accept connections from specific IP addresses. See the list of IP addresses to allowlist for database connections.


Make sure you've installed the Supermetrics add-on before you connect.

  1. Open a new Google Sheets file.
  2. Navigate to Extensions → Supermetrics → Launch sidebar to open Supermetrics.
  3. Click Create new query.
  4. Under Data source, select Database.
  5. Fill in the information for your connection. See “Database connector configuration” above for more details.
  6. Click Test connection to verify the configuration.
  7. Click Save
  8. Write your SQL statement in the Query SQL box. 
  9. Click Get Data to Table to pull your data.

More resources

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.