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
On this page

Submitting a SQL Job (Discarded)

Function

This API is used to submit jobs to a queue using SQL statements.

NOTE:

This API has been discarded and is not recommended.

The job types support DDL, DCL, IMPORT, EXPORT, QUERY, and INSERT. Functions of IMPORT and EXPORT are the same as those described in Importing Data (Discarded) and Exporting Data (Discarded). The difference lies in the implementation method.

Additionally, you can use other APIs to query and manage jobs. For details, see the following sections:

NOTE:
  • This API is synchronous if job_type in the response message is DCL.
  • Information described in this section has been disused. You are advised to view the information described in Submitting a SQL Job (Recommended).

URI

  • URI format

    POST /v1.0/{project_id}/queues/{queue_name}/jobs/submit-job

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

    queue_name

    Yes

    Current queue name. Resources of the queue are used for computing if SQL requires resources.

Request

Table 2 Request parameters

Parameter

Mandatory

Type

Description

sql

Yes

String

SQL statement that you want to execute.

currentdb

No

String

Database where the SQL statement is executed. This parameter does not need to be configured during database creation.

conf

No

Array of objects

User-defined parameter that applies to the job. Currently, the following configuration items are supported:

  • dli.sql.join.preferSortMergeJoin (specifies whether SortMergeJoin is preferred)
  • dli.sql.autoBroadcastJoinThreshold (specifies the data volume threshold to use BroadcastJoin. If the data volume exceeds the threshold, BroadcastJoin will be automatically enabled.)
  • dli.sql.caseSensitive (specifies whether SQL statements are case-sensitive)
  • dli.sql.shuffle.partitions (specifies the number of partitions during shuffling)
  • dli.sql.cbo.enabled (specifies whether to enable the CBO optimization policy)
  • dli.sql.cbo.joinReorder.enabled (specifies whether join reordering is allowed when CBO optimization is enabled)

Response

Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

If job_type is set to DCL, this parameter indicates whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

Yes

String

System prompt. If execution succeeds, the parameter setting may be left blank.

job_id

Yes

String

ID of a job returned after a job is generated and submitted by using SQL statements. The job ID can be used to query the job status and results.

job_type

Yes

String

Type of a job. Job types include the following:

  • DDL
  • DCL
  • IMPORT
  • EXPORT
  • QUERY
  • INSERT

schema

No

Array of Map

If the statement type is DDL, the column name and type of DDL are displayed.

rows

No

Array of objects

When the statement type is DDL, results of the DDL are displayed.

Example

  • Example request
    {
        "currentdb": "db1",
        "sql": "desc table1",
        "conf": [
            "dli.sql.shuffle.partitions = 200"
        ]
    }
  • Example response (successful request)
    {
      "is_success": true,
      "message": "",
      "job_id": "8ecb0777-9c70-4529-9935-29ea0946039c",
      "job_type": "DDL",
      "schema": [
        {
          "col_name": "string"
        },
        {
          "data_type": "string"
        },
        {
          "comment": "string"
        }
      ],
      "rows": [
        [
          "c1",
          "int",
          null
        ],
        [
          "c2",
          "string",
          null
        ]
      ]
    }
    NOTE:

    If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.

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