SQL Assist and Autocomplete Improvements

SQL Assist and Autocomplete Improvements

We’ve recently made some nice improvements to the autocomplete and assist panel that should really boost the experience when working with the notebooks or editing SQL queries in the Hive and Impala query editors.

One of the major improvements is support for complex types; structs, maps and arrays, both in the assist and autocomplete. See more of the improvements below or take a look at the following video demo.

 

A longer more detailed version is available here.

 

Complex in a simple way…

The assist panel now support complex types for Hive and Impala. Just click on the column and it’ll expand any of the structs, maps and arrays.

We’ve made the assist panel resizable, which is very handy when you have long table or column names or deep nested structures.

Assist_complex

 

If you find what you’re looking for in the panel you can double-click the item to insert it at the cursor in the active editor. You can also drag-and-drop it anywhere in the editor if you prefer another location. It knows about the structure and will insert the reference with all the parents up to and including the column name.

 

Ctrl+space is your friend!

You can use ctrl+space anywhere in the editor to activate the autocomplete. It will make suggestion based on the schema and it will also take the contents of the statement that you’re editing into account. Apart from the SQL keywords, tables and columns it will even suggest user-defined aliases.

Autocomplete_join_alias

 

It knows about complex types for Hive and Impala and will make the appropriate suggestions based on the reference that you’re currently editing.

Autocomplete_nested_struct

 

I heard you like exploded views! The autocomplete will help you with these, it keeps track of the exploded views as well as exploded views of exploded views of exploded views of…

Autocomplete_exploded

 

Values and HDFS paths

We’ve even added sample values to the mix. It’s currently only available for Impala and it will suggest a subset of all the values, this is really nice when working with for instance map keys or to give you an idea of the data.

Autocomplete_sample_values

 

Last but not least, the autocomplete can now suggest HDFS paths. Just type ‘/’ in one of the notebook snippets and it will automatically open the autocomplete panel with the list of folders and files at that location, of course you can also activate it with ctrl+space when editing an existing path.

Autocomplete_hdfs

 

We’ll keep improving the assist and autocomplete experience (support for HBase, any JDBC database, HDFS…) and hope that these new features will be useful for you!

Feel free to send feedback on the hue-user list or @gethue!

12 Comments

  1. Imtiaz 11 months ago

    What version has these update?

    • Hue Team 11 months ago

      Master as of October 2015 or Hue 3.10 that should come in Q2 2016

  2. chouyoung 9 months ago

    how can hue connect with my hdp cluster which made by ambari-server

  3. xmda 7 months ago

    Is there a way for individual users to turn this off??

    • Hue Team 7 months ago

      Not really, sorry. For us to understand, why would you turn the feature off?

      • Mathew 5 months ago

        It’s really annoing that the suggestions pop up after each input. A individual delay of the popup would be really helpful for better user experience.

        • Author
          Hue Team 5 months ago

          Thanks, will play around with it. Currently we are following what the main editors do in order to save constant keystrokes. Note that a much smarter autocompleter is coming in the next release. Is your main worry the usefulness of the help provided or just the constant dropdown showing up?

  4. Pete 2 months ago

    I also find the new autocomplete annoying. The popups come way to quickly and it often chooses something from the list when I don’t want it.
    Even a space is causing suggestions. Hitting return then picks the thing on the top of the list, which for me is often 0., when all I want is to jump to a new line.

    Hitting return on an empty line does the same thing. Very annoying. Now I have to hit escape before any return to stop garbage from getting in the line.

  5. Dan Gustafsson 1 month ago

    The autocomplete is awsome, but alas, flawed.
    Please tune it so it does not complete spaces or enter-strokes. Please tune it so it does not complete immediately but waits a few seconds (maybe 1 sec).
    Maybe it is a good thing to be able to turn it off, and then use ctrl-space to get it when wanted.
    Btw, the hdfs-helper for paths is just excellent! And the general auto-complete function is super!

    • Author
      Hue Team 1 month ago

      In some tools the autocomplete is on by default, they are differences of taste. You could ‘CTRL+,’, uncheck the Live autocompletion, then use CTRL+SPACE to prompt it manually later.

      • Tom Stewart 2 weeks ago

        In Hue 3.10 or Hue 3.11 how do you turn off autocomplete? When I hit CTRL+, I get a pop-up menu on the right side but don’t see anything to uncheck Live autocompletion. I also can’t figure out how to save settings in that pop-up menu, for example I tried changing from Hive to Text and that didn’t save or help disable autocomplete. One of the reasons to disable is a slowdown as the lists grow large.

Leave a reply

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

*