Count
count.co
  • Getting Started
    • What is Count?
    • Count FAQ
    • Intro to your workspace
    • Example canvases
    • Getting started guides
      • Set up your workspace and projects
        • 1. Review workspace settings
        • 2. Create and organise your projects
      • Canvas orientation
      • Your first ad hoc analysis
        • 1. Examples and templates
        • 2. Build your first queries
        • 3. Create visuals
        • 4. Caching, local cells and scheduling
        • 5. Collaborating with a stakeholder
      • Your first report
        • 1. Examples and templates
        • 2. Filters and control cells
        • 3. Sharing your report
        • 4. Alerts
  • Connect your data
    • Database connection overview
      • Athena
      • Azure Synapse
      • BigQuery
      • Databricks
      • Microsoft SQL Server
      • MySQL
      • PostgreSQL
      • Redshift
      • Snowflake
    • Refresh database schema
    • Upload CSV files
    • dbt integration
      • ☁️dbt Cloud integration
      • 👩‍💻dbt Core integration
  • Import & Export
    • Import from other tools
      • Import Miro files
      • Import SQL files
      • Import Google Sheets
      • Import Jupyter notebooks
    • Export code and results
      • Export compiled SQL and Jinja-SQL
      • Export CSV files
      • Export images and PDF files
  • THE CANVAS
    • Navigating the canvas
      • Canvas tool bar
      • Data sidebar
      • Customizing the canvas
    • Canvas objects
      • Cells
      • Text and markdown
      • Shapes and tools
      • Sticky notes
      • Frames
      • Images
      • Embeds
      • Stamps
      • Grouping objects
      • Object order and alignment
      • Locking objects
      • Scaling objects
      • Shared styles
    • Overviews
    • Templates
    • Count AI
    • Alerts and subscriptions
      • Slack integration
    • Keyboard shortcuts
  • Querying data
    • Cells overview
      • Dynamic query compilation engine
    • SQL cells
      • Referencing other cells
      • Jinja templating
      • SQL formatting
    • Python cells
    • Visual and low-code cells
      • Calculations in visuals and low-code cells
      • Joins in visuals and low-code cells
    • Control cells
      • Single and multiple selects
      • Date controls
      • Text, number, and boolean controls
      • Custom control cells
    • Local DuckDB cells
      • DuckDB on the server
    • Query caching and scheduling
    • Manage queries and results
    • Troubleshooting
  • Visualizing data
    • Visualization overview
    • Templated visuals
    • Custom visuals
      • Marks
      • Facet
      • Subplots
      • Style
      • Filters
    • Formatting a visual
      • Axes
        • Secondary Axis
      • Colors and labels
      • Legends
      • Tooltips
    • Column summaries
    • Dynamic text
    • Every Visual Under the Sun
  • Presenting and Reporting
    • Reports and Slides
  • Count Metrics
    • Intro to Count Metrics
    • Build and edit a catalog
    • Views
      • Creating views
      • Customizing views
    • Datasets
      • Creating datasets
    • Save changes to the catalog
      • Catalog validation
      • Version control
    • Exposing catalogs to the workspace
    • Caching in Count Metrics
    • Using the catalog
      • Explore from cell
  • Sharing and Permissions
    • Real-time collaboration
    • Comments
    • Sharing permissions
    • Shared links
    • Embedding canvases
  • History and Versions
    • Version control
    • Duplicating and merging
    • Data snapshots
  • Settings and administration
    • Workspace settings
      • Workspace members
      • Groups
      • Tags
      • Billing
      • Single sign-on (SSO)
        • Okta
        • Entra ID
        • JumpCloud
        • Google
        • Generic OIDC
      • Brand
    • Connection settings
    • Project settings
    • User settings
    • Roles and permissions
  • Quick guides
    • Interactive control guides
      • Date ranges
      • Date groupings
      • Search
      • Select All
  • Resources
    • Join the Slack community
  • Blog
  • Security overview
  • Terms of use
  • Pricing FAQ
Powered by GitBook
On this page
  • Click "Connect a database"
  • Enter your connection details
  • Connect
  • Connect via SSH (beta)
  • Advanced settings
  • Troubleshooting
  • SSL certificate errors
  • Limitations
  1. Connect your data
  2. Database connection overview

Redshift

How to connect Redshift to Count

PreviousPostgreSQLNextSnowflake

Last updated 4 months ago

Click "Connect a database"

Enter your connection details

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:

34.107.75.117
35.198.189.90
35.234.110.177
104.155.13.208

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.

Connect

Once you hit Connect you will see your connection details including a full list of tables accessible with this connection.

Connect via SSH (beta)

Count now supports SSH connections to your redshift database, via a bastion host.

This feature is in beta. Please contact Count support to request access to this feature.

To connect via SSH you must have

  • a bastion host in your VPC which can connect to your private database

  • whitelisted Count's server IPs so that we can securely connect to your bastion host VM

  • details for how to connect to your bastion host, including the host, port, user and a private SSH key.

On Count, you can additionally secure your traffic by specifying an SSH host and the algorithm used to generate it. Our servers will check this value against that provided by your VM on connection, helping to verify its identity. This information can be obtained when generating the SSH key pair. On AWS, this information is available in your EC2 instance System logs; you should see a entry in the log with a list of SSH host key keys

-----BEGIN SSH HOST KEY KEYS-----
<fingerprint-algorithm> <verification-key> <user>@<host>
<fingerprint-algorithm> <verification-key> <user>@<host>
...
-----END SSH HOST KEY KEYS-----

Select an algorithm and verification key pair and enter into the details in the above form.

Advanced settings

The Redshift connection in Count supports a number of advanced settings:

  • Max concurrent connections - Set the maximum number of simultaneous connections between Count and your database. If your database has a lower limit than the value set here, then the lower limit will take precedence.

  • Query timeout - queries executed from Count will be automatically aborted after this length of time.

Troubleshooting

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

GETADDRINFO ENOTFOUND

Is the server running on

Connection time out

Connection refused

Could not connect to server

Failed to establish a connection

ECONNREFUSED

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

SETUSERID: USER

Check the Username with these credentials is authorised to connect to the database from the whitelisted Count IP addresses

Schema/tables are missing from my connection

If you do not see tables listed in Count that you expect, please check that the permissions for the user account used by Count are configured correctly. To test which tables your credentials have access to, you can try running a query from a Count cell like:

select * from svv_all_tables

You should also confirm:

  • The user account used for Count is covered by any IP whitelisting rules you have established.

  • The user account used for Count has been granted usage permissions on any schemas you require. The permissions need to be granted by an account with schema ownership.

Some permissions may need a new session before they take effect. Count may retain a session for some time after it is last used, so waiting a little before refreshing schema may help.

SSL certificate errors

What does "Trust server certificate" mean?

You should consult your database administrator to confirm that this setting is appropriate for your system.

Limitations

Assert

A commonly encountered idiosyncrasy for Redshift users is the Assert error. A query 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

The following query may result in an Assert error due to the subqueries in the WHERE clause:

SELECT date_col FROM public.table 
WHERE date_col 
    BETWEEN (SELECT value FROM start_date) AND (SELECT value FROM end_date)

Fix 1 - use a 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

Fix 2 - use a jinja template

SELECT date_col FROM public.table 
WHERE date_col 
    BETWEEN {{ cells.start_date }}::date AND {{ cells.end_date }}::date

Details for how to set up a bastion host can be found in your cloud service provider's documentation. On AWS, the documentation for connecting to a redshift instance via a bastion host can be found .

Enable case-sensitive identifiers - read more about the impact of this setting .

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 attacks. Count will only use this mode of communication if you activate the "Trust server certificate" in the "Advanced" section of the connection setup.

If you are having trouble connecting, to us to schedule a help session

here
here
MITM
reach out
The Redshift connection page
The available advanced connection settings for Redshift