Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hue dumpdata returns "CommandError: Unable to serialize database: no such table: desktop_document2"

avatar
Contributor

Hi, 

 

I want to migrate the Hue database from sqlite3 to MySQL and dump the data from sqlite to a JSON file:

 

logged on as user "hue" (who is the "owner" of Hue)

 

$ /opt/cloudera/parcels/CDH-5.4.4-1.cdh5.4.4.p0.4/lib/hue/build/env/bin/hue dumpdata >hue_dumpdata.2015-07-20.json
CommandError: Unable to serialize database: no such table: desktop_document2

 

When I use sqlite to display the list of tables, I can see it there:

 

$ sqlite3 /var/hadoop/data/hue/desktop.db
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables '%';
auth_group                      oozie_datainput
auth_group_permissions          oozie_dataoutput
...

desktop_document                oozie_generic
desktop_document2               oozie_history
desktop_document2_dependencies  oozie_hive

...

 

What's wrong with this?

 

Thanks in advance.

 

Regards,

Slavo

1 ACCEPTED SOLUTION

avatar
Super Guru
Are you using CM?

If yes before running the command you need to:


*Note*:

If using CM, export this variable in order to point to the correct database:
1
2
3
HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/-hue-HUE_SERVER-id
echo $HUE_CONF_DIR
export HUE_CONF_DIR

Where is the most recent ID in that process directory for
hue-HUE_SERVER.


http://gethue.com/export-and-import-your-oozie-workflows/

View solution in original post

1 REPLY 1

avatar
Super Guru
Are you using CM?

If yes before running the command you need to:


*Note*:

If using CM, export this variable in order to point to the correct database:
1
2
3
HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/-hue-HUE_SERVER-id
echo $HUE_CONF_DIR
export HUE_CONF_DIR

Where is the most recent ID in that process directory for
hue-HUE_SERVER.


http://gethue.com/export-and-import-your-oozie-workflows/