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

Bug in redshift_batch when querying db. #7

Open
jorgeorpinel opened this issue May 8, 2019 · 0 comments
Open

Bug in redshift_batch when querying db. #7

jorgeorpinel opened this issue May 8, 2019 · 0 comments

Comments

@jorgeorpinel
Copy link

jorgeorpinel commented May 8, 2019

The bug is here: https://github.com/heroku-examples/analytics-with-kafka-redshift-metabase/blob/master/redshift_batch/index.js#L35

2nd line below:

      const query = Postgres.helpers.insert(queue, ecommTable);
      db.query(query, queue) // <-- `queue` not needed and can cause problems.

queue was already used for Postgres.helpers.insert (ref) so query is already a pure string. However it may contain dollar signs so sending queue (again) to db.query can cause errors.

Just remove ", queue".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant