Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
04-25-2016
01:07 PM
- last edited on
04-21-2026
06:53 AM
by
GrazittiAPI
I'm following the instructions: http://www.cloudera.com/documentation/enterprise/5-5-x/topics/cdh_ig_hue_database.html
When dumping the sqlite database, I get the following error:
sudo -u hue /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/build/env/bin/hue dumpdata > /tmp/huedump.json CommandError: Unable to serialize database: no such column: search_collection.owner_id
We started on version 5.3.3, upgraded to 5.4.7, and have now completed an upgrade to 5.7.0.
Can anyone tell me how to fix/get around this?
Created 04-25-2016 05:31 PM
This issue was corrected by using the sqlite3 command line interface and
(alter table search_collection add column owner_id int NULL)
No issues were seen after that.
Created 04-25-2016 02:00 PM
For reference, the table in the database looks like this:
CREATE TABLE "search_collection" (
"properties" text NOT NULL,
"sorting_id" integer NOT NULL,
"name" varchar(40) NOT NULL,
"facets_id" integer NOT NULL,
"enabled" bool NOT NULL,
"label" varchar(100) NOT NULL,
"is_core_only" bool NOT NULL,
"result_id" integer NOT NULL,
"cores" text NOT NULL,
"id" integer NOT NULL PRIMARY KEY);
and the create table command in hue looks like this:
db.create_table('search_collection', (
('properties', self.gf('django.db.models.fields.TextField')(default='{}')),
('sorting', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['search.Sorting'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=40)),
('facets', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['search.Facet'])),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)),
('label', self.gf('django.db.models.fields.CharField')(max_length=100)),
('is_core_only', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
('result', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['search.Result'])),
('cores', self.gf('django.db.models.fields.TextField')(default='{}')),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
))
So the field "owner_id" is definitely not there, and it looks like it shouldn't be, so why is it an error? Can I just create an owner_id field with some default value, or will that mess up something worse?
Created 04-25-2016 05:31 PM
This issue was corrected by using the sqlite3 command line interface and
(alter table search_collection add column owner_id int NULL)
No issues were seen after that.