Improved Hue Importer -- Select a file, choose a dialect, create a table

Published on 26 May 2021 in Version 4.10 / Development / Query - 2 minutes read - Last modified on 27 May 2021 - Read in jp

If you’ve ever struggled with configuring Hue to allow your users to create new SQL tables from CSV files on their own in the public Cloud, you’ll be happy to learn that this is now much easier.

If you're a pro Hue user, then you might be familiar with the Hue Importer. It lets you create tables from a file. Until now, the file had to be available on HDFS or cloud object storage, such as S3 or ABFS. Now you can browse and select files from your computer to create tables with different SQL dialects in Hue. Apache Hive, Apache Impala, Apache Phoenix, MySql dialects are supported.

Goal

  • Upload files using the Hue Importer independent of the source.

Why

  • Not everyone has access to HDFS or S3/ABFS. Often, Business Analysts need to quickly analyze data sets that they have on their computers and skip data cleanup or other data engineering tasks.
  • This feature enables you to import files from your computer and create tables in a few clicks.

Steps to create a table

Importer direct upload steps gif

Workflow

Importer direct upload steps app diagram

Files and APIs

  • We have used three APIs to implement this feature.
  • If you are curious about how various SQL dialects have been implemented, then take a look at the sql.py file.

Note- Currently, Hue supports smaller CSV files containing a few thousand rows.

Intermediate steps

  • step 1 Importer direct upload step1
    You select a file, Hue guesses the file format, identifies the delimiters, and generates a table preview.
  • step 2 Importer direct upload step2
    You select a SQL dialect and Hue auto-detects the column data types. You can edit column names and their data type.

Now it’s time to play with this feature in the latest Hue or at demo.gethue.com.


This project gladly welcome contributions for supporting more SQL dialects.
Any feedback or question? Feel free to comment here or on the Forum and quick start SQL querying!

Onwards!

Ayush from the Hue Team


comments powered by Disqus

More recent stories

10 June 2021
Hue 4.10 and its new SQL Editor component, REST API, small File Importer and Slack App are out!
Read More
29 May 2021
Build your own SQL Editor (BYOE) in 5 minutes via Sql Scratchpad component and public REST API.
Read More
26 May 2021
Improved Hue Importer -- Select a file, choose a dialect, create a table
Read More