This PR also sync up with target-snowflake. The two codebase as very similar and the common things potentially will be moved into a shared module in the future.
Solution
Wrap the table name in double quotes to make it safe to be in a Redshift sql query.
Example
The streams with one schema where the table is order:
Problem
Sometimes the stream/table name is a reserved word in Redshift and the current implementation doesn't support that so we end up getting a sql error. This PR is the equivalent of https://github.com/transferwise/pipelinewise-target-snowflake/pull/65 but for Amazon Redshift.
This PR also sync up with target-snowflake. The two codebase as very similar and the common things potentially will be moved into a shared module in the future.
Solution
Wrap the table name in double quotes to make it safe to be in a Redshift sql query.
Example
The streams with one schema where the table is
order
:Table in Redshift with a reserved word:
order
:Column in Redshift with a reserved word:
new
:The query
select * from local_dev_1."order"
outputs:Tests
Added a new e2e test to test this scenario