You need to enable JavaScript to run this app.
导航
数据集
最近更新时间:2023.10.08 10:43:09首次发布时间:2023.10.08 10:43:09
1. 创建数据集

接口说明

本接口可以创建数据集,数据集可以用于任务的输出节点。

请求地址

POST https://{domain}/aeolus/prep/userOpenAPI/v1/dataset

请求参数

参数名称类型默认值必填说明
namestring
appIdint项目ID
ownerEmailPrefixstring用户名
dataSetSourceIdint0数据集来源id, 默认0
clusterNamestring集群名
dbNamestring库名
tableNamestring表名
dataSourceTypestringhive
dataSetSourceint0:prep, 1: abi, 2: cdp
typestring1:实时,0:离线
dataSetConfobject

请求参数示例

{
  "name": "dataset_from_post_mann",
  "appId": 555327,
  "ownerEmailPrefix": "guohaishuai",
  "dataSetSourceId": 183029,
  "clusterName": "cn",
  "dbName": "dw_aeolus",
  "tableName": "tb_282b9e7e3b5b8877489811f2fa8f6fe3",
  "dataSourceType": "hive",
  "dataSetSource": 1,
  "type": 0
}

返回结果示例

{
    "code": "prep/ok",
    "message": "成功",
    "extraMsg": null,
    "advice": null,
    "data": {
        "id": 21,
        "name": "dataset_from_post",
        "descr": "",
        "appId": 1,
        "ownerEmailPrefix": "admin",
        "dataSetSource": 2,
        "dataSetSourceId": 2,
        "abiDataSetId": 0,
        "dataSourceType": "hive",
        "resourceGroup": 0,
        "region": "cn",
        "clusterName": "cn",
        "dbName": "dw_aeolus", // 数据集底表的库名
        "tableName": "bank_churners", // 数据集底表的表名
        "tableSize": 0,
        "tableLineNum": 0,
        "dataSetLabelType": 0,
        "dataSetTaskType": 0,
        "confidentiality": "L3",
        "ttl": null,
        "lineOfBusiness": [],
        "regionType": [],
        "productName": "",
        "generalTagSourceIds": [],
        "authKey": "prep_data_set_21",
        "status": 0,
        "extraAppIds": null,
        "ctime": null,
        "mtime": null,
        "dataSetConf": null,
        "isPersonalDataRelated": false,
        "dataRegion": null
    }
}
2. 获取数据集信息

接口说明

本接口可以获取数据集的详细信息。

请求地址

GET https://{domain}/aeolus/prep/userOpenAPI/v1/dataset

请求参数

参数名称类型默认值必填说明示例
dataSetIdint17830

返回结果示例

{
    "code": "prep/ok",
    "message": "成功",
    "extraMsg": null,
    "advice": "", // 错误建议,可空
    "data": {
        "id": 21,
        "name": "dataset_from_post",
        "descr": "",
        "appId": 1,
        "ownerEmailPrefix": "admin",
        "dataSetSource": 2,
        "dataSetSourceId": 2,
        "abiDataSetId": 0,
        "dataSourceType": "hive",
        "resourceGroup": 0,
        "region": "cn",
        "clusterName": "cn",
        "dbName": "dw_aeolus", // 数据集底表的库名
        "tableName": "bank_churners", // 数据集底表的表名
        "tableSize": 0,
        "tableLineNum": 0,
        "dataSetLabelType": 0,
        "dataSetTaskType": 0,
        "confidentiality": "L3",
        "ttl": 1, // 底表的ttl,单位为天,null/0 表示没有ttl
        "lineOfBusiness": [],
        "regionType": [],
        "productName": "",
        "generalTagSourceIds": [],
        "authKey": "prep_data_set_21",
        "status": 0,
        "extraAppIds": [], // List<Long> 镜像数据集app集合
        "ctime": 1, // 创建时间,毫秒时间戳
        "mtime": 1, // 修改时间,毫秒时间戳
        "dataSetConf": {}, // 主要存kafka信息或cdw实时导入任务id等信息
        "isPersonalDataRelated": false, // 资源是否包含用户信息
        "dataRegion": [] // List<String> 用户信息所属地区
    }
}
3. 获取数据集的Schema信息

接口说明

本接口可以获取数据集的Schema信息。

请求地址

GET https://{domain}/aeolus/prep/userOpenAPI/v1/dataset/dataSetSchema

请求参数

参数名称类型默认值必填说明示例
dataSetIdint17830

返回结果示例

{
    "code": "prep/ok",
    "message": "成功",
    "extraMsg": null,
    "advice": null,
    "data": null
}
4. 根据库表名获取对应的数据集信息

接口说明

本接口可以获取Prep中不同数据源的数据类型列表。

请求地址

GET https://{domain}/aeolus/prep/userOpenAPI/v1/dataset/getDataSetListByTb

请求参数

参数名称类型默认值必填说明示例
dbNamestringdw_aeolus
tableNamestringtb_282b9e7e3b5b8877489811f2fa8f6fe3
dataSourceTypestringhive

返回结果示例

{
    "code": "prep/ok",
    "message": "成功",
    "extraMsg": null,
    "advice": null,
    "data": [
        "string",
        "int",
        "double",
        "date",
        "timestamp",
        "long",
        "short",
        "float",
        "decimal",
        "binary",
        "boolean",
        "byte"
    ]
}
5. 获取数据集列表

接口说明

本接口可以获取Prep中数据集列表(未分类)。

请求地址

GET https://{domain}/aeolus/prep/userOpenAPI/v1/dataset/dataSetListWithoutClassification

请求参数

参数名称类型默认值必填说明示例
appIdint项目ID555327
ownerEmailPrefixstring用户名guohaishuai
kwstringtest_712_

返回结果示例

{
    "code": "prep/ok",
    "message": "成功",
    "extraMsg": null,
    "advice": null,
    "data": [
        {
            "id": 17835,
            "name": "test_712_4_抖店订单列表结构化数据_1",
            "descr": "",
            "appId": 555327,
            "ownerEmailPrefix": "zhouliang.niko",
            "dataSourceType": "click_house",
            "dataSetSource": 0,
            "region": "cn",
            "clusterName": "multi_disk_test",
            "dbName": "aeolus_data_db_multi_disk_test_202207_dev",
            "tableName": "tb_3ec48387c95e78e24bfe35b8f8e07fbb",
            "ctime": "2022-07-12T23:06:31.000+0800",
            "mtime": "2022-07-12T23:07:02.000+0800",
            "roleList": [
                {
                    "roleName": "管理",
                    "action": "admin"
                },
                {
                    "roleName": "编辑",
                    "action": "write_role"
                },
                {
                    "roleName": "查看",
                    "action": "read_role"
                }
            ],
            "taskOwnerRoleList": [],
            "authKey": "prep_data_set_17835",
            "abiDataSetId": 183032
        }
    ]
}