How-To Guides
...
Reporting Guides
Create Your Own Report with Re...

Connecting to a New Database

5min

This is the first step of creating your own report with the Reporting module.

We assume you already have a database configured and can connect to it from the instance on which you’re running Superset. If you’re just testing Superset and want to explore sample data, you can load some sample PostgreSQL datasets into a fresh DB or configure the example weather data we use here.

To connect to a database:

  1. Under the Sources menu, select the Databases option.
Document image

  • On the resulting page, click on the green plus + sign near the top right.
Document image

  • You can configure several advanced options on this page, but for this walkthrough, you’ll only need to do two things:

Name your database connection.

Document image


Provide the SQLAlchemy Connection URI and test the connection.

Document image


The example URI in the figure above is the connection string for our test weather database. As noted in the text below the URI field, you should refer to the SQLAlchemy documentation on creating new connection URIs for your target database.

  • Click the Test Connection button to confirm things work end to end. Once Superset can successfully connect and authenticate, you should see a popup like this:
Document image


Moreover, you should also see the list of tables Superset can read from the schema you’re connected to at the bottom of the page:

Document image

  • If the connection looks good, save the configuration by clicking the Save button at the bottom of the page.
Document image