Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

fix: skip rows where columns exceed field size limit. #894

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion edx/analytics/tasks/export/database_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@ def mapper(self, line):
key: course_id
value: tab separated row data
"""
values = csv_util.parse_line(line, dialect='mysqldump')
try:
values = csv_util.parse_line(line, dialect='mysqldump')
except csv.Error as e:
if 'field larger than field limit' in e.message:
log.error('Field larger than field limit in line: %s', line)
return
else:
log.error('Error parsing line: %s', line)
raise

record = StudentModuleRecord(*values)

course_id = record.course_id
Expand Down
Loading