Skip to content

Commit

Permalink
Update s3_to_redshift.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben committed Feb 26, 2018
1 parent f4b7a40 commit 6623b71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operators/s3_to_redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self,
if not (isinstance(self.foreign_key, dict) or isinstance(self.foreign_key, list)):
raise Exception('Foreign Keys must be specified as either a dictionary or a list of dictionaries.')

if ((',' in self.distkey) or not isinstance(self.distkey, str)):
if self.distkey and ((',' in self.distkey) or not isinstance(self.distkey, str)):
raise Exception('Only one distribution key may be specified.')

if self.sort_type.lower() not in ('compound', 'interleaved'):
Expand Down

0 comments on commit 6623b71

Please sign in to comment.