元数据查询API

    MetadataCoreRestful 类

    接口地址:

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述: 获取数据表的column信息

    请求参数:

    响应示例:

    getDatabases

    接口地址:/api/rest_j/v1/metadatamanager/dbs/{dataSourceId}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:获取数据源的数据库名称列表

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtruestring
    systemsystemquerytruestring

    响应示例:

    1. {
    2. "method": null,
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "dbs": [
    7. "information_schema",
    8. "linkis",
    9. "linkis_sit"
    10. ]
    11. }
    12. }

    接口地址:/api/rest_j/v1/metadatamanager/partitions/{dataSourceId}/db/{database}/table/{table}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    响应示例:

    getTableProps

    接口地址:/api/rest_j/v1/metadatamanager/props/{dataSourceId}/db/{database}/table/{table}

    请求方式:GET

    请求数据类型:

    响应数据类型:application/json

    接口描述:

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtruestring
    databasedatabasepathtruestring
    systemsystemquerytruestring
    tabletablepathtruestring

    响应示例:

    1. {
    2. "method": null,
    3. "message": "OK",
    4. "data": {
    5. "props": {
    6. "skip.header.line.count": "1",
    7. "columns.types": "int:int:string:string:string:string:string:string:string:string:string:string:string:string:string:string:string:string",
    8. "columns": "id,age,job,marital,education,default,balance,housing,loan,contact,day,month,duration,campaign,pdays,previous,poutcome,y",
    9. "field.delim": ",",
    10. "transient_lastDdlTime": "1646732554",
    11. "partition_columns.types": "string",
    12. "columns.comments": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
    13. "bucket_count": "-1",
    14. "serialization.ddl": "struct demo_data { i32 id, i32 age, string job, string marital, string education, string default, string balance, string housing, string loan, string contact, string day, string month, string duration, string campaign, string pdays, string previous, string poutcome, string y}",
    15. "file.outputformat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
    16. "partition_columns": "ds",
    17. "colelction.delim": "-",
    18. "serialization.lib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
    19. "name": "dss_autotest.demo_data",
    20. "location": "hdfs://bdpdev01/user/hive/warehouse/hadoop/dss_autotest.db/demo_data",
    21. "mapkey.delim": ":",
    22. "file.inputformat": "org.apache.hadoop.mapred.TextInputFormat",
    23. }
    24. }
    25. }

    接口地址:/api/rest_j/v1/metadatamanager/props/{dataSourceId}/db/{database}/table/{table}/partition/{partition}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述:

    请求参数:

    响应示例:

    getTables

    接口地址:/api/rest_j/v1/metadatamanager/tables/{dataSourceId}/db/{database}

    请求方式:GET

    请求数据类型:application/x-www-form-urlencoded

    响应数据类型:application/json

    接口描述: 获取数据源的某个数据库的数据表列表

    参数名称参数说明请求类型是否必须数据类型schema
    dataSourceIddataSourceIdpathtruestring
    databasedatabasepathtruestring
    systemsystemquerytruestring

    响应示例:

    1. {
    2. "method": null,
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    6. "tables": [
    7. "test",
    8. "test_0317a",
    9. "test_import_sqoop_1",
    10. "test_linkis_sqoop_1",
    11. "test_linkis_sqoop_2",
    12. "test_linkis_sqoop_3",
    13. "upload_test"
    14. ]
    15. }