Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLUSTER_ID is required for Redshift shell to work. #256

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dataduct/pipeline/redshift_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
PASSWORD = config.redshift['PASSWORD']


#If both are there, we will pick the Connection String. Cluster ID is required for the Redshift shell to work
if 'CLUSTER_ID' in config.redshift and 'CONNECTION_STRING' in config.redshift:
raise ETLConfigError('Redshift credentials - either CLUSTER_ID or CONNECTION_STRING is required in config')
CONNECTION_STRING = config.redshift['CONNECTION_STRING']
elif 'CLUSTER_ID' in config.redshift:
CLUSTER_ID = config.redshift['CLUSTER_ID']
elif 'CONNECTION_STRING' in config.redshift:
CONNECTION_STRING = config.redshift['CONNECTION_STRING']
raise ETLConfigError('Redshift credentials - CLUSTER_ID is also required while connecting using CONNECTION_STRING.')


class RedshiftDatabase(PipelineObject):
"""Redshift resource class
Expand Down