Browse Source

HUE-6586 [sqoop] Strip sqoop if present in beginning of command

Romain Rigaux 8 năm trước cách đây
mục cha
commit
9ea0e19
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      apps/oozie/src/oozie/models2.py

+ 6 - 1
apps/oozie/src/oozie/models2.py

@@ -813,7 +813,12 @@ class Node():
       action = notebook.get_data()['snippets'][0]
 
       name = '%s-%s' % (self.data['type'].split('-')[0], self.data['id'][:4])
-      self.data['properties']['command'] = action['statement']
+
+      command = action['statement']
+      if command.startswith('sqoop '):
+        _ignore, command = command.split('sqoop ', 1)
+      self.data['properties']['command'] = command
+
       self.data['properties']['arguments'] = []
 
     elif self.data['type'] == DistCpDocumentAction.TYPE: