El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Using Hue to Execute HiveQL

Updated on 2024-12-13 GMT+08:00

Scenario

Hue provides the Hive management UI to run HiveQL (HQL) statements and query Hive data.

Access Editor

  1. Access the Hue web UI. For details, see Accessing the Hue Web UI.
  2. In the navigation tree on the left, click and choose Hive. The Hive page is displayed.

    Hive supports the following functions:

    • Running HQL statements

      Select the target database on the left. You can also click in the upper right corner and enter the target database name to search for the database.

      Enter an HQL statement in the text box and click or press Ctrl+Enter to run the HQL statement. The execution result is displayed on the Result tab page.

    • Analyzing HQL statements

      Select the target database on the left, enter the HQL statement in the text box, and click to compile the HQL statement and check whether the statement is correct. The execution result is displayed under the text editing box.

    • Saving HQL statements

      Enter the HQL statement in the text box, click in the upper right corner, and enter the name and description. You can view the saved statements in the Saved Queries tab.

    • Viewing historical records

      Click Query History to view the HQL status. You can view the history of all the statements or only the saved statements. If many historical records exist, you can enter keywords in the text box to search for desired records.

    • Configuring advanced queries

      Click in the upper right corner to configure the file, function, and settings.

    • Viewing the information of shortcut keys

      Click in the upper right corner to view information about all shortcut keys.

How to Use Metadata Browser

Access the Hue web UI. For details, see Accessing the Hue Web UI.

  • Viewing metadata of Hive tables

    Click in the navigation tree on the left and click a table name. The metadata of the Hive table is displayed.

  • Managing metadata of Hive tables

    On the metadata information page of a Hive table:

    • Click Import in the upper right corner to import data.
    • Click Overview to view the location of the table file in the Properties field.

      View the field information of each column in a Hive table and manually add description information. Note that the added description information is not the field comments in the Hive table.

    • Click Sample to browse data.
  • Managing Hive metadata tables

    Click in the left list to create a table based on the uploaded file in the database. You can also manually create a table.

CAUTION:

The Hue page is used to view and analyze data such as files and tables. Do not perform high-risk management operations such as deleting objects on the page. If such an operation is required, perform the operation on each component after confirming that the operation does not affect services. For example, use the HDFS client to perform operations on HDFS files and use the Hive client to perform operations on Hive tables.

Executing HQL Statements

  1. Select a Hive database from the Database drop-down list box. The default database is default.

    The system displays all available tables. You can enter a keyword of the table name to search for the desired table.

  2. Click the desired table name. All columns in the table are displayed.

    Move the cursor to the row where the table or column is located and click . Column details are displayed.

  3. Enter the query statements in the area for editing HQL statements.
  4. Click to execute the HQL statements.

    Figure 1 Executing a statement
    NOTE:
    • If you want to use the entered HQL statements again, click to save them.
    • Advanced query configuration:

      Click in the upper right corner to configure information such as files, functions, and settings.

    • Viewing the information of shortcut keys:

      Click in the upper right corner to view the syntax and keyboard shortcut information.

    • To delete an entered HQL statement, click the triangle next to and select Clear.
    • Viewing history:

      Click Query History to view the HQL running status. You can view the history of all the statements or only the saved statements. If many historical records exist, you can enter keywords in the text box to search for desired records.

Viewing Execution Results

  1. View the execution results below the execution area on Hive. The Query History tab page is displayed by default.
  2. Click a result to view the execution result of the executed statement.

    NOTE:

    Hue does not support the display of a large amount of data. When a large number of SQL query results are loaded, the page may be frozen and some data may not be displayed. It is recommended that no more than 5,000 lines of query results be loaded.

Managing Query Statements

  1. Click Saved Queries.
  2. Click a saved statement. The system automatically adds the statement to the editing area.

Modifying the Session Configuration of the Hue Editor

  1. On the editor page, click .
  2. Click on the right of Files, and then click to select files.

    You can click next to Files to add a file resource.

  3. In the Functions area, enter a user-defined name and the class name of the function.

    You can click next to Functions to add a customized function.

  4. In the Settings area, enter the Hive parameter name in the Key, and value in Value. The current Hive session connects to Hive based on the customized configuration.

    You can click to add a parameter.

Typical Scenario

On the Hue page, create a Hive table as follows:

  1. Click at the upper left corner of Hue web UI and select the Hive instance to be operated to enter the Hive command execution page.
  2. Enter an HQL statement in the command input box, for example:

    create table hue_table(id int,name string,company string) row format delimited fields terminated by ',' stored as textfile;

    Click to execute the HQL statements.

    Figure 2 Executing a statement

  3. Enter the following command in the command input box:

    show tables;

    Click to view the created table hue_table in Result.

    Figure 3 Viewing the result

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback