このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

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

SQL Job Management

Updated on 2022-12-07 GMT+08:00

SQL jobs allow you to execute SQL statements entered in the SQL job editing window, import data, and export data.

SQL job management provides the following functions:

SQL Jobs page

On the Overview page of the DLI console, click SQL Jobs to go to the SQL job management page. Alternatively, you can click Job Management > SQL Jobs. The job list displays all SQL jobs. If there are a large number of jobs, they will be displayed on multiple pages. You can switch to the specified page as needed. DLI allows you to view jobs in all statuses. By default, jobs in the job list are displayed in descending order of the job creation time.

Table 1 SQL Job management parameters

Parameter

Description

Queues

Name of the queue to which a job belongs

Username

Name of the user who executed the job.

Type

Job type. The following types are supported:

  • IMPORT: A job that imports data to DLI
  • EXPORT: A job that exports data from DLI
  • DCL: Conventional DCLs and operations related to queue permissions
  • DDL:Conventional DDLs, including creating and deleting databases and tables
  • QUERY: A job that querys data by running SQL statements
  • INSERT: A job that inserts data by running SQL statements
  • UPDATE: A job that updates data.
  • DELETE: A job that deletes a SQL job.
  • DATA_MIGRATION: A job that migrates data.
  • RESTART_QUEUE: A job that restarts a queue.
  • SCALE_QUEUE: A job that changes queue specifications, including sale-out and scale-in.

Status

Job status. Possible values are as follows:

  • Submitting
  • Running
  • Finished
  • Canceled
  • Failed
  • Scaling

Query

SQL statements for operations such as exporting and creating tables

You can click to copy the query statement.

Duration

Running duration of a job

Created

Time when a job is created. Jobs can be displayed in ascending or descending order of the job creation time.

Operation

  • Edit: Edit the job.
  • Cancel
    • You can terminate a job only when the job is in Submitting or Running status.
    • A job whose status is Finished, Failed, or Canceled cannot be terminated.
    • If the Cancel button is gray, you are not allowed to perform this operation.
  • Re-execute: Execute the job again.
  • SparkUI: Display the Spark job execution page.
    NOTE:
    • When you execute a job on a created queue, the cluster is restarted. It takes about 10 minutes. If you click SparkUI before the cluster is created, an empty projectID will be cached. The SparkUI page cannot be displayed. You are advised to use a dedicated queue so that the cluster will not be released. Alternatively, wait for a while after the job is submitted (the cluster is created), and then check SparkUI.
    • Currently, only the latest 100 job information records are displayed on the SparkUI of DLI.
  • In addition to the preceding operations, the following operations are available for QUERY jobs and asynchronous DDL jobs.
    • View Result: View the job running result.
    • Export Result: Export the job running result to the created OBS bucket. For details, see section Exporting Query Results.
  • In addition to the preceding operations, the EXPORT job also includes the following operations:
    • Download
  • View Log: Save job logs to the temporary OBS bucket created by DLI.
  • Export Log: Export logs to the created OBS bucket. If the job is in the Running state, logs cannot be exported.
NOTE:

To export the logs, you need to obtain the permission to create an OBS bucket.

Log archiving and export are not available for synchronization jobs and jobs running on the default queue.

Searching for a Job

On the SQL Jobs page, you can search jobs with any of the following operations.

  • Select a queue name.
  • Set the date range.
  • Enter a username, statement, or job ID.
  • Select the creation time in ascending or descending order.
  • Select a job type.
  • Select a job status.
  • Select the job execution duration in ascending or descending order.

Viewing Job Details

On the SQL Jobs page, you can click in front of a job record to view details about the job.

The following describes how to load data, create a table, and select a job. The job details vary depending on the job types, status, and configuration options.

  • Load data (job type: IMPORT) include the following information: queue, job ID, username, type, status, execution statement, running duration, creation time, end time, parameter settings, label, number of results, scanned data, number of scanned data, number of error records, storage path, data format, database, table, table header, separator, reference character, escape character, date format, and timestamp format.
  • Create table (job type: DDL) include the following information: queue, job ID, username, type, status, execution statement, running duration, creation time, end time, parameter settings, tags, number of results, scanned data, and database.
  • Select (job type: QUERY) include the following information: queue, job ID, username, type, status, execution statement, running duration, creation time, end time, parameter setting, label, number of results (results of successful executions can be exported), and scanned data, username, result status (results of successful tasks can be viewed. Failure causes of failed tasks are displayed), and database.

Terminating a Job

On the SQL Jobs page, you can click Terminate in the Operation column to stop a submitting or running job.

Exporting Query Results

A maximum of 1000 records can be displayed in the query result on the console. To view more or all data, you can export the data to OBS. The procedure is as follows:

You can export results on the SQL Jobs page or the SQL Editor page.

  • On the Job Management > SQL Jobs page, you can click More > Export Result in the Operation column to export the query result.
  • After the query statements are successfully executed on the SQL Editor page, click on the right of the View Result tab page to export the query result.
NOTE:

If no column of the numeric type is displayed in the query result, the result cannot be exported.

Table 2 Exporting parameters

Parameter

Description

Data Format

Format of the exported query result file. Formats other than JSON will be supported in later versions.

Queues

The queue where the jobs are excuted. SQL jobs can be executed only in SQL queues. For details about how to create a queue, see Creating a Queue.

Compression Format

Compression format of the data to be exported. The following options are supported:

  • none
  • bzip2
  • deflate
  • gzip

Storage Path

OBS path to store the result.

NOTE:
  • After selecting an OBS bucket, enter a name for the folder. If the folder does not exist, it will be created in OBS.
  • The folder name cannot contain the special characters of \ / : * ? "< > |, and cannot start or end with a dot (.).

Export Mode

Mode for saving the exported query result data.

  • New OBS directory: If the specified export directory exists, an error is reported and the export operation cannot be performed.
  • Existing OBS directory (Overwritten): If you create a file in the specified directory, the existing file will be overwritten.

Number of Results

Number of exported query results. If no value is entered or the value is 0, all results are exported.

Table Header

Whether the data to be exported contains table headers.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback