Area: Ingestion
Sub-Area: Redshift Source
Applies to: OSS + Cloud
Issue
You set connection settings such as sslmode or connect_timeout under options in a Redshift recipe, and they have no effect on the connection. Ingestion still fails to connect, or it connects without the settings you asked for.
You Might Be Asking
- Why is
sslmodeunderoptionsignored? - Where do I put driver settings for the Redshift connection?
- Do
include_tablesandinclude_viewschange SSL behavior? - Does setting up IAM roles turn on IAM authentication?
Cause
The Redshift source opens its main connection with redshift_connector.connect(host, port, user, database, password, **config.extra_client_options). Keys under options are not passed to that call.
options is a different setting. Its contents are passed as keyword arguments to SQLAlchemy create_engine, which the profiler uses. Driver settings placed there do not reach the main connection.
include_tables and include_views both default to true. They only choose which object types are ingested. They have nothing to do with SSL.
Solution
- Remove driver settings such as
sslmodeandconnect_timeoutfromoptions. - Put driver settings under
extra_client_options. Each key must be an argument thatredshift-connectoraccepts. The valid keys are listed on the redshift-connector page on PyPI.
source:
type: redshift
config:
extra_client_options:
<redshift-connector argument>: <value>
- If you use IAM authentication, configure it through
extra_client_optionstoo. The host, port, user, database and password are the only other values the connection uses, so setting up IAM roles alone does not change how the source authenticates. - Remove the
# SSL configurationcomment frominclude_tablesandinclude_views. Keep those keys only if you need to change their defaults. - Re-run ingestion and check the run log. See Troubleshooting failed ingestion for how to open it.
Error text such as "SSL/TLS handshake failure" comes from the driver or the network, not from DataHub. Use it as a hint for which driver argument to set.