def mapper(self, line): """ Yields the correct values by consulting mapper_yield """ values = csv_util.parse_line(line, dialect="mysqldump") record = StudentModuleRecord(*values) return self.mapper_yield(record) # return generator we got from yield
def mapper(self, line): """ Yields the correct values by consulting mapper_yield """ values = csv_util.parse_line(line, dialect='mysqldump') record = StudentModuleRecord(*values) return self.mapper_yield(record) # return generator we got from yield
def mapper(self, line): """ Extract course and reformat each line. Returns: key: course_id value: tab separated row data """ values = csv_util.parse_line(line, dialect='mysqldump') record = StudentModuleRecord(*values) course_id = record.course_id # Convert to a tab separated row tab_separated_row = csv_util.to_csv_line(record, dialect='mysqlpipe') yield course_id, tab_separated_row