Decimal() is not JSON serializable error in Hue for DbQuery - CDH 5.4.3/Hue 3.7

53 views
Skip to first unread message

rockssk

unread,
Jan 15, 2016, 12:31:25 PM1/15/16
to Hue-Users
Hi,

I access MySQL tables via DBQuery option in Hue. Selec statement on  tables with Decimal type are failing with the exception given below. 

Please help fix this

ENV:
CDH 5.4.3
Hue 3.7
MySQL : Server version: 5.5.11 MySQL Community Server (GPL)

Error : Server error occured: Decimal('-5.000000000') is not JSON serializable

MySQL Column : | Amount          | decimal(30,9) | YES  |     | NULL    |       |

 

Romain Rigaux

unread,
Jan 19, 2016, 10:50:59 AM1/19/16
to rockssk, Hue-Users
Yes, we would need to update

https://github.com/cloudera/hue/blob/master/apps/rdbms/src/rdbms/api.py#L48

and text serialize it if it is an instance of Decimal.

We will have a patch shortly


--
You received this message because you are subscribed to the Google Groups "Hue-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Suresh Kumar Sethuramaswamy

unread,
Jan 19, 2016, 2:52:42 PM1/19/16
to Romain Rigaux, Hue-Users
Thanks Romain

How do I text serialize it?

Romain Rigaux

unread,
Jan 19, 2016, 4:49:47 PM1/19/16
to Suresh Kumar Sethuramaswamy, Hue-Users
We will have this pushed soon: https://review.cloudera.org/r/6715/
Reply all
Reply to author
Forward
0 new messages