From fbf84d5913f8aa69b1698ae1ab0db52dc1ef22ae Mon Sep 17 00:00:00 2001 From: Hassan Date: Mon, 30 Oct 2023 21:28:10 -0500 Subject: [PATCH] fix: sqoop workaround for mysql 8.0 --- edx/analytics/tasks/common/sqoop.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/edx/analytics/tasks/common/sqoop.py b/edx/analytics/tasks/common/sqoop.py index 5615603881..9efb78ea23 100644 --- a/edx/analytics/tasks/common/sqoop.py +++ b/edx/analytics/tasks/common/sqoop.py @@ -255,6 +255,15 @@ 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 do not support these options, so we need to + # explicitly disable them. + arglist.append('--') + arglist.append('--no-tablespaces') + arglist.append('--opt') + return arglist def source_database_type(self):