How is your experience with the OutSystems Community?
6
Views
1
Comments
How to connect to AWS Redshift from OutSystems?
Question

Hi all,

I'm trying to connect an AWS Redshift cluster to OutSystems as an external database connection, using the PostgreSQL / Aurora PostgreSQL DBMS option (Advanced Configuration mode), since there's no native Redshift DBMS type in the dropdown.

My connection string (Configuration Parameters):

Host=my-cluster.xxxxxxxxxx.us-east-1.redshift.amazonaws.com;Port=5439;Database=mydb;SSL Mode=Require;Trust Server Certificate=true;Server Compatibility Mode=Redshift;

Error I keep getting on "Test Connection":

Connection String test failed: 42501: must be superuser to examine "server_version"

What I've already tried:

  • Confirmed the DB user/password work fine connecting via psql directly to the same cluster
  • Added Server Compatibility Mode=Redshift to the connection parameters (this is supposed to make Npgsql skip the pg_settings introspection query that's triggering this) — still fails
  • Confirmed SSL params (SSL Mode=Require;Trust Server Certificate=true;) are accepted and the connection string builds correctly
  • Granted SELECT ON ALL TABLES IN SCHEMA pg_catalog to the Redshift user — no change

Since OutSystems' PostgreSQL connector uses Npgsql under the hood, and Redshift's pg_settings/system catalogs are a restricted subset of real Postgres, I suspect this might be a compatibility gap rather than something fixable purely via connection string tuning — but I wanted to check with the community before concluding that.

Questions:

  1. Has anyone successfully connected OutSystems to AWS Redshift (not Aurora Postgres, actual Redshift)? If so, could you share a working connection string / configuration parameters?
  2. Is there a supported/recommended way to do this — e.g., via a custom JDBC extension instead of the built-in PostgreSQL connector — or is direct Redshift connectivity just not fully supported yet?
  3. Is this Npgsql Server Compatibility Mode flag actually respected by OutSystems' connector, or does OutSystems override/ignore certain Npgsql parameters?

Environment:

  • OutSystems version: 11.42.1 (Build 47790)
  • DBMS: PostgreSQL / Aurora PostgreSQL (Advanced Configuration)

Any pointers, working examples, or confirmation this isn't currently supported would be really appreciated. Thanks!

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Sathish Kumar ,

I think your assumption is correct. This looks more like a compatibility issue than a connection string issue.

Redshift is based on PostgreSQL, but it is not fully PostgreSQL compatible. In your case, OutSystems/Npgsql is trying to read server_version, and Redshift is blocking that operation for a normal user.

Since your credentials are working with psql, I don't think changing the SSL settings or adding more permissions will fix this.

There was a similar Redshift discussion where a custom PostgreSQL connector was used:

https://www.outsystems.com/forums/discussion/84815/connecting-to-external-redshift-database/   

I would suggest trying a custom database connector/extension for Redshift instead of using the built-in PostgreSQL/Aurora connection.

Another option, if you only need to read/write specific data, is to put an API in front of Redshift and consume it from OutSystems.

I would also raise this with OutSystems Support to confirm whether Redshift is officially supported with the current PostgreSQL connector, especially since Server Compatibility Mode=Redshift doesn't seem to change the behaviour.

Hope this helps.

Regards,

Manish Jawla

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.