数据湖探索 DLI-DLI SDK与API的对应关系:SQL作业相关

时间:2024-01-17 18:08:49

SQL作业相关

表4 SQL作业相关API&SDK的对应关系表

Class

Method

Java Method

Python Method

API

Database

创建数据库

createDatabase

create_database

POST /v1.0/{project_id}/databases

删除数据库

deleteDatabase

delete_database

DELETE /v1.0/{project_id}/databases/{database_name}

查询所有数据库

listAllDatabases

list_databases

GET /v1.0/{project_id}/databases

修改数据库用户

-

-

PUT /v1.0/{project_id}/databases/{database_name}/owner

Table

创建 DLI

createDLITable

create_dli_table

POST /v1.0/{project_id}/databases/{database_name}/tables

创建OBS表

createObsTable

create_obs_table

POST /v1.0/{project_id}/databases/{database_name}/tables

删除表

deleteTable

delete_table

DELETE /v1.0/{project_id}/databases/{database_name}/tables/{table_name}

查询所有表

listAllTables

list_tables

GET /v1.0/{project_id}/databases/{database_name}/tables?keyword=tb&with-detail=true

描述表信息

getTableDetail

get_table_schema

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}

预览表内容

-

-

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/preview

修改表用户

-

-

PUT /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/owner

Job

导入数据

submit

import_table

POST /v1.0/{project_id}/jobs/import-table

导出数据

submit

export_table

POST /v1.0/{project_id}/jobs/export-table

提交作业

submit

execute_sql

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

取消作业

cancelJob

-

DELETE /v1.0/{project_id}/jobs/{job_id}

查询所有作业

listAllJobs

-

GET /v1.0/{project_id}/jobs?page-size={size}&current-page={page_number}&start={start_time}&end={end_time}&job-type={QUERY}&queue_name={test}&order={duration_desc}

查询作业结果

queryJobResultInfo

-

GET/v1.0/{project_id}/jobs/{job_id}?page-size={size}&current-page={page_number}

查询作业状态

-

-

GET/v1.0/{project_id}/jobs/{job_id}/status

查询作业详细信息

-

-

GET/v1.0/{project_id}/jobs/{job_id}/detail

查询SQL类型作业

listSQLJobs

-

-

检查SQL语法

-

-

POST /v1.0/{project_id}/jobs/check-sql

导出查询结果

-

-

POST /v1.0/{project_id}/jobs/{job_id}/export-result

support.huaweicloud.com/sdkreference-dli/dli_04_0123.html