Check out our step-by-step video showing how to connect your PostgreSQL database to Chartio:

If your PostgreSQL database is hosted on Heroku or Amazon RDS, please follow those instructions for connecting your instance.

PostgreSQL read-only user

The Chartio connection form requires a read-only username and password, which you’ll need to create on your PostgreSQL database before you submit the connection form.

Allowing Chartio to connect to your database

By default, PostgreSQL restricts connections to hosts and networks included in the pg_hba.conf file. You may need to add Chartio’s IP address to this file to allow connectivity to your database; you’d add the line to pg_hba.config in the following format:

host databaseName username md5

Here’s an example, where the username is “chartio_read_only” and the database is “mydatabase”:

host mydatabase chartio_read_only md5

You may need to restart your PostgreSQL server for the changes to take effect.

For more details on modifying the pg_hba.conf file consult the PostgreSQL documentation.

Query comment

To provide more context to where queries to your data source are coming from, Chartio includes a query comment to any queries we send; it looks similar to the following:

	"datasource_alias":"my data source",
	"dataset_name":"Dataset 1",