Metadata Query API

    MetadataQueryRestful class

    Interface address:

    Request method: GET

    Request data type: application/x-www-form-urlencoded

    Response data type: application/json

    Interface description: Get the column information of the data table

    Request Parameters:

    Sample Response:

    Interface address:/api/rest_j/v1//metadataQuery/getDatabases

    Request method: GET

    Request data type: application/x-www-form-urlencoded

    Response data type: application/json

    Interface description: Get the list of database names of the data source

    Request Parameters:

    Parameter nameParameter descriptionRequest typeRequiredData typeschema
    dataSourceNamedataSourceNamepathtruestring
    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. }

    return value adjusted to props -> partitions

    Interface address:/api/rest_j/v1//metadataQuery/getPartitions

    Request method: GET

    Request data type: application/x-www-form-urlencoded

    Response data type: application/json

    Interface description:

    Request Parameters:

    Sample Response:

    Interface address:/api/rest_j/v1//metadataQuery/getTableProps

    Request method: GET

    Request data type:

    Response data type: application/json

    Interface description:

    Parameter nameParameter descriptionRequest typeRequiredData typeschema
    dataSourceNamedataSourceNamepathtruestring
    databasedatabasepathtruestring
    systemsystemquerytruestring
    tabletablepathtruestring

    Sample Response:

    1. {
    2. "method": null,
    3. "status": 0,
    4. "message": "OK",
    5. "data": {
    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: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. "serialization.format": ",",
    24. }
    25. }
    26. }

    Interface address:/api/rest_j/v1//metadataQuery/getPartitionProps

    Request method: GET

    Request data type: application/x-www-form-urlencoded

    Response data type: application/json

    Interface description:

    Request Parameters:

    Sample Response:

    Interface address:/api/rest_j/v1//metadataQuery/getTables

    Request method: GET

    Request data type: application/x-www-form-urlencoded

    Response data type: application/json

    Interface description: Get the list of data tables of a database of the data source

    Parameter nameParameter descriptionRequest typeRequiredData typeschema
    dataSourceNamedataSourceNamepathtruestring
    databasedatabasepathtruestring
    systemsystemquerytruestring

    Sample Response:

    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. ]