Reply
New Contributor
Posts: 4
Registered: ‎05-06-2016

Hue - Oozie - OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default value")

Hi I am trying to create a Oozie workflow to execute Hive operation thru Hue 3.9 and i am getting below error. OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default value") While creating a workflow in Oozie Workflow editor and trying to save the workflow, i am getting error. Please see the dump below. Please help me what could be the issue.

 

 

[06/May/2016 14:34:59 -0400] middleware   INFO     Processing exception: (1364, "Field 'parent_directory_id' doesn't have a default value"): Traceback (most recent call last):   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/handlers/base.py", line 112, in get_response     response = wrapped_callback(request, *callback_args, **callback_kwargs)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/transaction.py", line 371, in inner     return func(*args, **kwargs)   File "/opt/cloudera/fs-hue/hue/apps/oozie/src/oozie/decorators.py", line 85, in decorate     return view_func(request, *args, **kwargs)   File "/opt/cloudera/fs-hue/hue/apps/oozie/src/oozie/views/editor2.py", line 198, in save_workflow     workflow_doc = Document2.objects.create(name=workflow['name'], uuid=workflow['uuid'], type='oozie-workflow2', owner=request.user, description=workflow['properties']['description'])   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/manager.py", line 157, in create     return self.get_queryset().create(**kwargs)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 322, in create     obj.save(force_insert=True, using=self.db)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 545, in save     force_update=force_update, update_fields=update_fields)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 573, in save_base     updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 654, in _save_table     result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/base.py", line 687, in _do_insert     using=using, raw=raw)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/manager.py", line 232, in _insert     return insert_query(self.model, objs, fields, **kwargs)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 1514, in insert_query     return query.get_compiler(using=using).execute_sql(return_id)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 903, in execute_sql     cursor.execute(sql, params)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute     return self.cursor.execute(sql, params)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/utils.py", line 99, in __exit__     six.reraise(dj_exc_type, dj_exc_value, traceback)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute     return self.cursor.execute(sql, params)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/mysql/base.py", line 124, in execute     return self.cursor.execute(query, args)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.5-py2.6-linux-x86_64.egg/MySQLdb/cursors.py", line 205, in execute     self.errorhandler(self, exc, value)   File "/opt/cloudera/fs-hue/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.5-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default value")

Cloudera Employee
Posts: 723
Registered: ‎07-30-2013

Re: Hue - Oozie - OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default

Which Hue version are you using? master?
New Contributor
Posts: 4
Registered: ‎05-06-2016

Re: Hue - Oozie - OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default

Thank you Romainr for the response.
we are using Hue 3.9, CM 5.5.3 and CDH 5.5.1.
Highlighted
New Contributor
Posts: 4
Registered: ‎05-06-2016

Re: Hue - Oozie - OperationalError: (1364, "Field 'parent_directory_id' doesn't have a default

Additional information:

below are the two commands that we executed after Hue 3.9 is up:

 

/build/env/bin/hue syncdb --noinput

/build/env/bin/hue migrate