def emit(self, message):
<EOL>if isinstance(message.get("<STR_LIT:data>"), list):<EOL><INDENT>for row in message.get("<STR_LIT:data>"):<EOL><INDENT>filename = self.format_filename(message, row)<EOL>if not os.path.exists(filename):<EOL><INDENT>self.create(filename)<EOL><DEDENT>self.log.debug("<STR_LIT>" % (<EOL>message.get("<STR_LIT>"), self.field, row.get(self.field), filename))<EOL>self.update(filename, message.get("<STR_LIT>"), row.get(self.field))<EOL><DEDENT><DEDENT>
emit to database