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

Commit

Permalink
fix: sqoop workaround for mysql 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanJaveed84 committed Oct 31, 2023
1 parent c0981cf commit 3b1568c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions edx/analytics/tasks/common/sqoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ def import_args(self):
arglist.append('--direct')
if self.mysql_delimiters:
arglist.append('--mysql-delimiters')

# Sqoop 1.4.6 adds --skip-opt by default, which in turn adds
# NO_FIELD_OPTIONS, NO_KEY_OPTIONS and NO_TABLE_OPTIONS to the sql_mode.
# MySQL 8.0 does not support these options, so we need to
# explicitly disable them.
# https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes
arglist.append('--')
arglist.append('--no-tablespaces')
arglist.append('--opt')

return arglist

def source_database_type(self):
Expand Down

0 comments on commit 3b1568c

Please sign in to comment.