- 23 May 2023
- 4 Minutes to read
Troubleshoot your Connection
- Updated on 23 May 2023
- 4 Minutes to read
As a Preset Admin, one of your first steps will be connecting a database to Preset so that team members can easily access data and build visualizations. Although we have made the database connection process as intuitive as possible, there are times when an error or misconfiguration may appear.
To help facilitate your success with Preset, we encourage you to read through the best practices and common connection scenarios described below.
Check #1: Database running?
Confirm that the database is publicly addressable and is currently up and running.
Check #2: Database supported?
Ensure that your database is supported by Preset. You can view a list of supported databases here.
Check #3: Have all connection details?
Preset can connect to a wide variety of databases, many of which require different types of information in order to make a connection. For example, Google Sheets requires a URL with specific sharing settings, Amazon Redshift requires a host and port, and nearly all databases can be connected to Preset via a SQLAlchemy URI.
Before trying to connect, we recommend that you take some time to read through the relevant connection walkthrough article in order to familiarize yourself with database-specific connection details.
Connection Walkthrough Articles
If you'd like to view the SQLAlchemy URI connection strings for all supported databases, please view the Connection Strings table for detailed information.
A timeout error may occur if you have not properly configured your firewall/network. Preset Cloud currently runs on four regions with the IPs listed below, and those need to be allowlisted so Preset can access your data.
Before starting, please take a moment to allowlist the IPs below based on the region that you're deployed in.
|us-west-2 (us1a)||us-east-1 (us2a)||eu-north-1 (eu5a)||ap-northeast-1 (ap1a)|
If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this: https://xxxxxxxx.us2a.app.preset.io/superset..., where us2a means it is in us-east-1.
Access is Denied
Is the username and password correct? Verify that the login credentials are accurate.
You may be required to enter a username and password when connecting your database to Preset. When entering connection details, please take note of the required Username and Password fields, such as the ones below from the PostgreSQL → Preset connection process:
Alternatively, the user credentials may be included in a SQLAlchemy URI string, such as this one used for a Dremio → Preset connection:
Some databases may require that access is granted on a per server basis. Check your database manual on how to grant SELECT permissions on your database.
Database Not Found or Cannot Connect
If the database cannot be found, then your database or account name may be incorrect.
Verify that your host and port names are correct during configuration.
Always take note of the Host, Port, and Database Name (or Account) fields, such as the ones below used when configuring a MySQL → Preset connection.
Tip: Dynamic Form Validation
Remember that some databases require additional information in order to connect, so pay attention to required fields while ensuring accuracy. For example, connections to a Snowflake database require Warehouse and Role fields.
Some databases require extra steps in order to gather all of the required authentication details necessary to create a connection. For example, connecting to a Databricks database requires the creation of an access token while Google BigQuery requires a JSON authentication key generated in the Google Cloud Platform Console. Remember, if you don't find the answers you need in one of our walkthrough articles, please submit a support ticket for assistance.
A note on authentication...
Some databases require extra steps in order to gather all of the required authentication details necessary to create a connection.
For example, connecting to a Databricks database requires the creation of an access token while Google BigQuery requires a JSON authentication key generated in the Google Cloud Platform Console.
Remember, if you don't find the answers you need in one of our walkthrough articles, please submit a support ticket for assistance.
SSL Connection is required
If you're having difficulty establishing a connection to your Redshift databse, try to add adding
sslmode=verify-ca to the ADDITIONAL PARAMETERS field or toggling on SSL in case the database requires an SSL connection.
Connection Error Messages
Via dynamic form
When adding a database via the dynamic form, you will receive in-app error messages when an incorrect host is entered:
...or an invalid port is entered:
Via SQLAlchemy URI
If connecting to a database using a SQLAlchemy URI, then any returned error messages will appear in the lower right corner of your screen.
Some of the more common errors for PostgreSQL and Snowflake connections include:
Incorrect database name
Incorrect username and password
Incorrect warehouse and role (Snowflake)
Preset Issue Codes
If there is an issue when connecting your database, you will more than likely receive an issue code. Please feel free to view a list of all Preset Issue Codes for your reference — this information may also come in handy in the event that you need to discuss a connection issue with Preset Support.
What if I Need Help?
If you're still encountering issues when connecting your database to Preset, please let us know via a Support Ticket so that we can get you up & running as quickly as possible!