Browse Source

HUE-8970 [sqlalchemy] Avoid TypeError is not JSON serializable on column sample popup

Romain 6 years ago
parent
commit
a633b37afa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/sql_alchemy.py

@@ -282,7 +282,7 @@ class SqlAlchemyApi(Api):
     else:
       columns = assist.get_columns(database, table)
       response['name'] = next((col['name'] for col in columns if column == col['name']), '')
-      response['type'] = next((col['type'] for col in columns if column == col['name']), '')
+      response['type'] = next((str(col['type']) for col in columns if column == col['name']), '')
 
     response['status'] = 0
     return response