Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.3.0
-
Fix Version/s: 2.4.0
-
Component/s: app.catalog
-
Labels:None
-
Target Version:
Description
Problem:
When using the "Create a new table from a file" wizard, Hue will ignore the delimiter detected/provided and use CTRL+A (\u0001) instead.
How To Reproduce:
- Go to the Hue Metastore page and click "Create a new table from a file"
- Upload a simple comma separated file.
- Hue will automatically detect it's comma separated and you can follow the rest of the wizard with pretty much all the filled defaults.
- Finish the wizard and have it create the table
- Query the table, results should be malformed.
- Do a DESCRIBE EXTENDED/FORMATTED in the Hive shell, and you should see \u0001 as the delimiter.
Workaround:
ALTER the table's SERDEPROPERTIES, for example: If I wanted to use TAB delimited you can type in the Hue HQL editor or Hive shell.
ALTER TABLE <table_name> SET SERDEPROPERTIES ('field.delim' = '\t'); ALTER TABLE <table_name> SET SERDEPROPERTIES ('serialization.format' = '\t');
Quick fix:
Modify this 2 new lines (replace the red one by the green one):
https://github.com/cloudera/hue/commit/c4d3023c6dc685b6bcc03a72129b9359526e8636#L1R211
https://github.com/cloudera/hue/commit/c4d3023c6dc685b6bcc03a72129b9359526e8636#L1R242