Metabase

You can use Metabase to create real-time dashboards based on the data maintained in Materialize.

Database connection details

To set up a connection from Metabase to Materialize, use the native PostgreSQL database driver with the following parameters:

Field Value
Database type PostgreSQL
Host Materialize host name.
Port 6875
Database name materialize
Database username Materialize user.
Database password App-specific password.
SSL mode Require

For more details and troubleshooting, check the Metabase documentation.

Configure a custom cluster

To direct queries to a specific cluster, set the cluster at the role level using the following SQL statement:

ALTER ROLE <your_user> SET CLUSTER = <custom_cluster>;

Replace <your_user> with the name of your Materialize role and <custom_cluster> with the name of the cluster you want to use.

Once set, all new sessions for that user will automatically run in the specified cluster, eliminating the need to manually specify it in each query or connection.

Refresh rate

By default, the lowest refresh rate for Metabase dashboards is 1 minute. You can manually set this to a lower interval by adding #refresh=1 (as an example, for a 1 second interval) to the end of the URL, and opening the modified URL in a new tab.

Because Metabase queries are simply reading data out of self-updating views in Materialize, setting your dashboards to auto-refresh at lower rates should not have a significant impact on database performance. To minimize this impact, we recommend carefully choosing an indexing strategy for any objects serving results to Metabase.

Back to top ↑