Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Special characters changed in the Ambari Hive query editor when pressing Execute.

New Contributor


Im messing around in the sandbox trying to figure out how to load data with special characters. I created a test table running the following:

CREATE TABLE default.test (name STRING); ALTER TABLE default.test SET serdeproperties ('serialization.encoding'='UTF-8');

Next I tried in insert some data:

INSERT INTO default.test (name) VALUES ("Nordström");

But to my surprise, when i clicked "Execute" the text in the query editor changed to

INSERT INTO default.test (name) VALUES ("Nordstr??m");

Anyone knows why this is happening?




Super Mentor

@Ulf Nordström

Which version of ambari is it? It might be ambari 2.2.2 or below.

I re-read your question and your issue is with the "Query Editor" there wre some issues reported in earlier version of ambari like ambari 2.2.2 which are fixed in Ambari 2.4 please see:

In Ambari 2.2.2 or prior this error was occurring because the View was writing the Scripts in HDFS in non UTF format so when the query editor was reloading after clicking on the "Submit" button then while reading the script sontent from the HDFS it was getting it back with those junk characters (? characters). You should upgrade to ambari 2.4 if you are not already in that release.



After Ambari 2.4 (There seems to be another issue i encountered). (Not related to 'Query Editor' but more of hive side) I reported similar issue for hive.

Please check the hive server log if ambari is passing the correct values to it? I found that ambari was passing correct value to hiveserver2 as it was properly printed in the hiveserver log but hive was not able to display it properly.

cd /var/log/hive
tail -f hiveserver2.log


New Contributor

Thanks for your input!

I'm on Ambari Version so the "Multi byte character should be have been fixed".

My hiveserver2.log had failed to log the event but I had a look at the logfil at "/user/admin/hive/jobs/hive-job-410-2017-03-23_12-09/logs" instead:

INFO  : Dag name: insert into default.test (n...("Nordstr??m")(Stage-1)
INFO  : 

INFO  : Status: Running (Executing on YARN cluster with App id application_1489519726025_0035)

INFO  : Map 1: -/-	
INFO  : Map 1: 0/1	
INFO  : Map 1: 0(+1)/1	
INFO  : Map 1: 0(+1)/1	
INFO  : Map 1: 1/1	
INFO  : Loading data to table default.test from hdfs://
INFO  : Table default.test stats: [numFiles=4, numRows=3, totalSize=37, rawDataSize=23]

Seems like the "ö" character were already replaced by "??" by then.

New Contributor

Did anyone find the solution for this? I am going through the same problem. Ambari is version 2.4.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.