Creating tables in Cloudera Data Explorer (Hue) by importing files
Using Data Explorer Importer, you can create Hive,
Impala, and Iceberg tables from CVS and XLSX files. After enabling the File Browser for your
cloud provider, you can import the file into Data Explorer to
create tables.
You can upload and import a 200 KB file from your local computer, or import a file up
to 3 GB from cloud storage (S3, ADLS Gen2, and Google Cloud Storage (GS) buckets)
using the Importer.
You can create managed and external tables. When you create managed tables, the data
is moved to HDFS in the Cloudera Data Warehouse workspace. When you
create external tables, your data remains in its original location.
Enable user access to cloud storage buckets/containers in Ranger
Enable the File Browser for your cloud provider
Log in to the Data Explorer web interface.
Click Importer from the left-assist panel.
Alternatively, click to create tables under the Databases > Tables list view. This opens the Hue Importer.
Under SOURCE, select Remote File
from the Type drop-down menu.
Click .. at the end of the Path
field.
The Choose a file modal is displayed.
(Non-RAZ deployment only) Click on your cloud provider, type the following
depending on your cloud provider, and press enter:
(AWS): s3a://[***BUCKET-NAME***]
(Azure): abfs://[***CONTAINER-NAME***]
(GCS): gs://[***BUCKET-NAME***]
Browse and select the file you want to use to create a table.
Data Explorer displays the preview of the table
along with the format.
Data Explorer automatically detects the field
separator, record separator, and the quote character from the file. If you want
to override a specific setting, then you can change it by selecting a different
value from the drop-down menu.
Click Next.
The table destination and properties are displayed.
Under Extras, deselect Store in Default
location and Transaction table
options.
This is required to create external tables.
Select the Copy file option.
Selecting this option retains the source file in the original location and
creates a copy of the file to create a table.
If you do not select this option, then Data Explorer moves the file from the source location to a new folder, making it
unavailable in the original location.
Optional: Set the table destination, partitions, and change the column data types.
Verify the settings and click Submit to create the
table.
The CREATE TABLE query is triggered.
Data Explorer displays the logs and opens the
Table Browser from which you can view the newly created table when the operation
completes successfully.