Skip to content

Commit

Permalink
Ensure lowercase column names before column differential check
Browse files Browse the repository at this point in the history
This change fixes Issue airflow-plugins#18 by ensuring column names are lowercased before
column differential check.
  • Loading branch information
gavinpaes authored and Gavin Paes committed May 22, 2020
1 parent 949b96d commit 8334e3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operators/s3_to_redshift_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def reconcile_schemas(self, schema, pg_hook):
""".format(self.redshift_schema, self.table)

pg_schema = dict(pg_hook.get_records(pg_query))
incoming_keys = [column['name'] for column in schema]
incoming_keys = [column['name'].lower() for column in schema]
diff = list(set(incoming_keys) - set(pg_schema.keys()))
print(diff)
# Check length of column differential to see if any new columns exist
Expand Down

0 comments on commit 8334e3f

Please sign in to comment.