def get_existing_keys(self, events):
data = [e[self.key] for e in events]<EOL>ss = '<STR_LIT:U+002C>'.join(['<STR_LIT:%s>' for _ in data])<EOL>query = '<STR_LIT>' % (self.key, self.table, self.key, ss)<EOL>cursor = self.conn.conn.cursor()<EOL>cursor.execute(query, data)<EOL>LOG.info("<STR_LIT>", query, data)<EOL>existing = [r[<NUM_LIT:0>] for r in cursor.fetchall()]<EOL>LOG.info("<STR_LIT>" % existing)<EOL>return set(existing)<EOL>
Returns the list of keys from the given event source that are already in the DB