Skip to content

Commit

Permalink
Enclosing column names in quotes (#19)
Browse files Browse the repository at this point in the history
* Enclosing column names in quotes, when building the SELECT clause

* Updated the version

* Corrected a misspelling in the readme
  • Loading branch information
laconc authored May 23, 2018
1 parent 2ba0441 commit 8b36e02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Example:
.. code-block:: json
{
"host": "REDSHIFT_HOSTT",
"host": "REDSHIFT_HOST",
"port": "REDSHIFT_PORT",
"dbname": "REDSHIFT_DBNAME",
"user": "REDSHIFT_USER",
Expand Down Expand Up @@ -305,4 +305,4 @@ This example uses ``target-datadotworld`` but can be modified to use any other S
-c config-redshift.json \
--catalog catalog.json \
-s latest-state.json | \
target-datadotworld -c config-dw.json > state.json
target-datadotworld -c config-dw.json > state.json
4 changes: 2 additions & 2 deletions tap_redshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from tap_redshift import resolve

__version__ = '1.0.0b4'
__version__ = '1.0.0b5'

LOGGER = singer.get_logger()

Expand Down Expand Up @@ -286,7 +286,7 @@ def sync_table(connection, catalog_entry, state):
tap_stream_id = catalog_entry.tap_stream_id
LOGGER.info('Beginning sync for {} table'.format(tap_stream_id))
with connection.cursor() as cursor:
columns = [c for c in columns]
columns = ['"{}"'.format(c) for c in columns]
select = 'SELECT {} FROM {}'.format(
','.join(columns),
catalog_entry.table)
Expand Down

0 comments on commit 8b36e02

Please sign in to comment.