Skip to content

Bug in redshift_batch when querying db. #7

@jorgeorpinel

Description

@jorgeorpinel

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions