How to connect your Redshift database to Count

1. Click "Add a connection" from your workspace menu

2. Enter your connection details

The Redshift connection page
To connect your database, you'll need to enter:
  • Host
  • Port
  • Database name
  • Username
  • Password
You'll also need to ensure that your firewall accepts requests from the following IP addresses:
Connections between Count and your database are encrypted by SSL (TLS). Your database must be configured to use SSL in order for Count to connect.

3. Connect!

Once you hit Connect you will see your connection details including a full list of tables accessible with this connection.
Use Projects to manage which users have access to which tables.


If you're having trouble connecting, check the error message returned at the top of the Connection page against the table below for a possible fix.
Error snippet
Possible resolution
Is the server running on
Connection time out
Connection refused
Could not connect to server
Failed to establish a connection
Check your Host and Port settings and that your database server is open to accept connections from the whitelisted Count IP addresses
Password authentication failed for user
Password authentication failed; please check Username, Password, and Database name settings
No PG_HBA.CONF entry for host
Check the Username with these credentials is authorised to connect to the database from the whitelisted Count IP addresses

SSL certificate errors

What does "Trust server certificate" mean?

If you are unable to obtain a copy of your database CA (e.g. some Heroku systems), the only way to initiate encrypted communication with your database is to trust that the certificate sent by the server is correct (SSL mode "require"). This ensures full protection against eavesdropping, but not against MITM attacks. Count will only use this mode of communication if you activate the "Trust server certificate" in the "Advanced" section of the connection setup.
You should consult your database administrator to confirm that this setting is appropriate for your system.
If you are having trouble connecting, reach out to us to schedule a help session



A commonly encountered idiosyncrasy for Redshift users is the Assert error. A query written by a user in a code cell submitted to Redshift can result in an Assert error for a number of reasons, one of them being a bug in the Redshift itself. Below is a list of cases and workarounds for how to amend queries returning Assert errors.
Multiple subqueries in WHERE clause
Multiple subqueries in a WHERE clause when e.g. filtering from control cells
SELECT date_col FROM public.table
WHERE date_col
BETWEEN (SELECT value FROM start_date) AND (SELECT value FROM end_date)
Fix: use CROSS JOIN instead of multiple subqueries
SELECT date_col FROM public.table
CROSS JOIN start_date
CROSS JOIN end_date
WHERE date_col
BETWEEN start_date.value AND end_date.value
Last modified 2mo ago