Brand new autocompleter for Hive and Impala

Brand new autocompleter for Hive and Impala

Greetings SQL experts!

To make your SQL editing experience better we’ve created a brand new autocompleter for Hue 3.11. The old one had some limitations and was only aware of parts of the statement being edited. The new autocompleter knows all the ins and outs of the Hive and Impala SQL dialects and will suggest keywords, functions, columns, tables, databases, etc. based on the structure of the statement and the position of the cursor.

The result is improved completion throughout. We now have completion for more than just SELECT statements, it will help you with the other DDL and DML statements too, INSERT, CREATE, ALTER, DROP etc.

Smart column suggestions

If multiple tables appear in the FROM clause, including derived and joined tables, it will merge the columns from all the tables and add the proper prefixes where needed. It also knows about your aliases, lateral views and complex types and will include those. It will now automatically backtick any reserved words or exotic column names where needed to prevent any mistakes.

Smart keyword completion

The new autocompleter suggests keywords based on where the cursor is positioned in the statement. Where possible it will even suggest more than one word at at time, like in the case of IF NOT EXISTS, no one likes to type too much right? In the parts where order matters but the keywords are optional, for instance after FROM tbl, it will list the keyword suggestions in the order they are expected with the first expected one on top. So after FROM tbl the WHERE keyword is listed above GROUP BY etc.

UDFs, what are the arguments for find_in_set?

The improved autocompleter will now suggest functions, for each function suggestion an additional panel is added in the autocomplete dropdown showing the documentation and the signature of the function. The autocompleter know about the expected types for the arguments and will only suggest the columns or functions that match the argument at the cursor position in the argument list.

Sub-queries, correlated or not

When editing subqueries it will only make suggestions within the scope of the subquery. For correlated subqueries the outside tables are also taken into account.

All about quality!

We’ve fine-tuned the live autocompletion for a better experience and we’ve introduced some options under the editor settings where you can turn off live autocompletion or disable the autocompleter altogether (if you’re adventurous). To access these settings open the editor and focus on the code area, press CTRL + , (or on Mac CMD + ,) and the settings will appear.

The autocompleter talks to the backend to get data for tables and databases etc. by default it will timeout after 5 seconds but once it has been fetched it’s cached for the next time around. The timeout can be adjusted in the Hue server configuration.

We’ve got an extensive test suite but not every possible statement is covered, if the autocompleter can’t interpret a statement it will be silent and no drop-down will appear. If you encounter a case where you think it should suggest something but doesn’t or if it gives incorrect suggestions then please let us know.


As usual you can send feedback and participate on the hue-user list or @gethue!



  1. 诸葛云峰 3 years ago

    Click on the search button in a short time, the button will be restored to the state of the query, rather than the state, and then the results will be in a very long time after the

  2. Ben Sullins 2 years ago

    What setting do you use to disable the autocomplete? I’m running into this bug and need to turn it off entirely –

  3. Alex 2 years ago

    when i try to retrieve Hive tables and databases metadata from “Metastore Tablese” the connection to Hive Metastore hangs and i receive a timeout error and a “Problem accessing table metadata” error. I tried to increase the connection timeout in hue.ini but it don’t resolves the problem. Instead if i run Hive queries from Hive, Hive CLI or beeline or i try to retrieve metadata launching “show tables” and “show databases” commands from these tools all works fine. Any help?

    • Author
      Hue Team 2 years ago

      What do you see in the Hive logs?
      How many databases do you have? Is Hue pointing to the correct HiveServer2?
      Are you using some type of security?

      • Alex 2 years ago

        I have only one HiveServer2 on the same machine of Hue installation and I use Ranger as type of security.
        I think there’s a compatibility problem between Hue and HDP 2.5. Please see this thread:!topic/hue-user/r0GYwZbmlrY

        Thank you

        • Author
          Hue Team 2 years ago

          Something might be configured differently in Hive in HDP.

          To help restricting the possibilities, could you check if Hue 3.10 just works or not there?

  4. Yuvakumar 2 years ago


    I am facing the same problem, and getting an error message “Problem accessing table metadata”, if I try to list tables in metastore. For all other users in the cluster, however it seems to work. Only for me it is not working? What could go wrong? Kindly suggest.


    • Author
      Hue Team 2 years ago

      What do you see in the /logs page of Hue after the error?

  5. Zane 2 years ago

    Hi Hue Team,

    Is there api documents that I can use the editor and autocompleter in my project?


  6. Ryan 1 year ago

    I also am trying to turn off the autocomplete feature. I find it to be distracting, especially when inserting comments that are obviously meant to be free text. The instructions here do not work for me – I am on a mac and command + . does nothing, and in the settings, there is only an entry that says “Completers”, with a text entry field that says “undefined”. Nothing works.

    • Author
      Hue Team 1 year ago

      On which version of Hue are you? The latest autocompleter (in 4.0+) is much better than it was before, and it can be turned off with cmd (or ctrl on win) + ,

      • Ryan 1 year ago

        Hi – sorry for the delay, didn’t realize you had responded. Our enterprise account is on 3.10. We are a large company and I have no ability to update the version that we use. Is there no way to disable it on 3.10?

        • Author
          Hue Team 1 year ago

          Try CTRL + ,
          and there are options on the right.

  7. ilyas 5 months ago

    Please I would like to use Hue as a visualization interface for hive, the server hiveserver 2 starts well and I can work in command without problem.

    My hadoop is also functional (single node running on localhost), I managed to configure the hdfs files for hue and I can easily view hdfs files with the interface hue. but my big problem for weeks is to make a HIVE request with hue (even if I configured according to the research I found on the internet). I can not do it and get stuck on it

Leave a reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.