You need to enable JavaScript to run this app.
导航
创建资产输出任务V2 - createAssetTaskV2
最近更新时间:2024.12.06 13:07:31首次发布时间:2024.07.10 15:50:11

请求说明

  • 请求方式:POST
  • 接口名称:createAssetTaskV2
  • 请求地址:https://console.volcengine.com/cdp/open_platform/openapi

请求参数

参数

类型

是否必选

示例值

描述

Authorization

String

HMAC-SHA256 Credential=BDPP2952f97532xxxxxx/20240716/cn/openPlatform/request, SignedHeaders=host;x-content-sha256;x-date, Signature=131f3d297eb22a7xxxxxx

详细介绍请查阅调用方式文档

Query

参数

类型

是否必选

示例值

描述

ApiAction

String

createAssetTaskV2

固定值,对应“请求说明”中的“接口名称”

ApiVersion

String

2024-05-22

固定值,版本号: 2024-05-22

Body

参数

类型

是否必选

示例值

描述

tenantId

Integer

1

项目ID

taskName

String

任务名称

dataAssetConf

Object

数据资产配置

outputConf

Object

输出配置

outputType

Object

输出类型

platform

String

输出平台的类型,可选值: aliOss

tableType

String

输出数据类型,可选值: TotalWideTable,代表全量宽表

返回参数

data数组字段参数

参数

类型

示例值

描述

taskId

Int

任务id

请求示例

{
    "tenantId": 5,
    "taskName": "openapi2024-12-03T11:30:46.949",
    "dataAssetConf": {
        "subjectId": 1,
        "dataAssetType": "SEGMENT",
        "segsDetails": {
            "segIds": [
                1001989
            ],
            "showIdType": true,
            "tagDetails": {
                "tagIds": [
                    304
                ]
            }
        }
    },
    "outputConf": {
        "outputFrequency": "single",
        "authAccount": "admin",
        "separator": ","
    },
    "outputType": "inner_storage",
    "platform": "hdfs",
    "tableType": "TotalWideTable"
}

返回示例

{
    "code": 0,
    "msg": "成功",
    "data": {
        "total": 317,
        "pageSize": 10,
        "pageNum": 1,
        "data": [
            {
                "id": 1001989,
                "name": "openapi2024-11-26T11:11:36.931984",
                "desc": null,
                "condition": {
                    "targetIdTypeId": 1,
                    "majorIdValues": null,
                    "encryptionMethod": null,
                    "onlineServiceEnabled": false,
                    "extraCondition": {
                        "type": "SqlExport",
                        "sql": "select id_map from (SELECT toInt16(0) AS idx, arrayToBitmapWithEncode(groupArray(base_id), 'profile_tob', 'tag_bitmaps_did_cdp', 'id_map', 0, 1) AS id_map\nFROM (SELECT base_id\nFROM (SELECT base_id, arraySum(inner.3) AS n\nFROM (SELECT attributionAnalysis2('target', ['click - event_done'], [''], 604800, 1, 0, [0])(toUInt64(col_time), col_params, col_num, '') AS inner, base_id\nFROM (SELECT base_id, col_time, col_params, col_num\nFROM (select col_time, 'target' as col_params, base_id, sum(toFloat64OrZero(col_value)) as col_num from (select toUInt64(assumeNotNull(base_id)) as base_id, col_value, col_date, toUnixTimestamp((toDateTime(col_date) + toIntervalDay(1)) - toIntervalSecond(1)) as col_time from (select toUInt64(base_id) as base_id, toDate32(p_date) as col_date, money as col_value from aeolus_data_db_rangers_202406.tb_070bfd428d6692e6d5c47bca6fce9ea5 where  1 = 1  and  1=1  and  1 = 1  and  1=1  and  (toDate32(p_date) >= '2024-11-19' and toDate32(p_date) <= '2024-11-26')  and base_id is not null and col_value is not null) ) group by base_id, col_time union all select col_time, 'click - event_done' as col_params, base_id, sum(toFloat64OrZero(col_value)) as col_num from (select base_id, 'event_done' as event, toDate32(col_time) as col_date, col_time, 'event_done' as col_value, 1 as col_num from ( select  toUInt64(base_id) as base_id, toUnixTimestamp(toDateTime(time)) as col_time from aeolus_data_db_rangers_202406.tb_585f6fde78fa62c4789e9adc09994c38 et where  1 = 1  and  1=1  and  1 = 1  and  (toDate32(p_date) >= '2024-11-12' and toDate32(p_date) <= '2024-11-26')  and  ( event = 'click' )  and base_id is not null  )) group by base_id, col_time) a\nJOIN \n(SELECT DecodeNonBitEngineColumn(arrayJoin(bitmapToArray(id_map)), 'profile_tob', 'tag_bitmaps_did_cdp', 'id_map') AS base_id\nFROM (select toInt16(0) as idx, id_map from (   select base_id_0 as id_map  from (    select BitMapExtract('0')(idx, base_id_1) as base_id_0  from (                             ( select  toInt16(0) as idx, BitMapColumnOr(id_map) as base_id_1  from (     select id_map,tag_value_double          from profile_tob.tag_bitmaps_did_cdp     where  p_date = '2024-11-25'      and tag_type = 1     and id_type = 1     and tag_id = 5      ) where  ( toInt64(tag_value_double) = 0 )  )                          )      settings distributed_perfect_shard = 1, prefer_localhost_replica = 0, send_timeout = 6000, receive_timeout = 6000   )  )) ) b\nON (a.base_id = b.base_id)\nSETTINGS  distributed_perfect_shard = 1, prefer_localhost_replica = 0 ) \nGROUP BY base_id) ) \nWHERE (n != 0)) tmp__sf__sql\nSETTINGS  distributed_perfect_shard = 1, prefer_localhost_replica = 0 )",
                        "showConf": null
                    },
                    "realtimeEnabled": null,
                    "sampleLimit": null,
                    "kvKeyFormat": null
                },
                "taskConf": {
                    "scheduleType": "Trigger",
                    "skipCheck": null,
                    "notAutoRun": null,
                    "scheduleTime": "00:00",
                    "scheduleStartDate": null,
                    "scheduleEndDate": null,
                    "segTaskDependencySettingDetail": null,
                    "scheduleDateTimes": null
                },
                "taskResults": [
                    {
                        "taskTime": "2024-11-26 00:00:00",
                        "startTime": "2024-11-26 11:11:37",
                        "endTime": "2024-11-26 11:12:11",
                        "status": "Success",
                        "taskType": "FileTask",
                        "errMsg": "",
                        "elapseTime": 34,
                        "count": 436,
                        "filePath": "/user/datarangers/bdb/application/segmentation/segment_v2/target/2024-11-26/1001989/135926/5de3600d-5b1a-4cc3-8896-85e90d2c7640.gz",
                        "effectiveRate": null
                    },
                    {
                        "taskTime": "2024-11-26 00:00:00",
                        "startTime": "2024-11-26 11:11:37",
                        "endTime": "2024-11-26 11:12:42",
                        "status": "Success",
                        "taskType": "BitmapTask",
                        "errMsg": null,
                        "elapseTime": 65,
                        "versionId": 135927,
                        "pDate": "2024-11-26"
                    }
                ],
                "lastSuccessTaskResults": null,
                "count": 436,
                "exportAt": "2024-11-26 11:12:11",
                "createdBy": "admin",
                "createTime": "2024-11-26 11:11:37",
                "updatedBy": "admin",
                "updateTime": "2024-11-26 11:11:37",
                "idType": {
                    "id": 1,
                    "name": "主体1的基准ID",
                    "code": "baseid",
                    "subjectId": 1,
                    "subjectName": "主体1",
                    "entityType": "BaseId"
                },
                "sourcePlatform": "CDP",
                "sourceModule": null,
                "deletedFlag": 0,
                "segType": "SqlExport",
                "tenantId": 5,
                "bdbTaskId": 100006771,
                "childSegments": null,
                "readable": true,
                "isHidden": false,
                "publicSegId": null,
                "groupInfo": [],
                "onlineServiceTaskId": null,
                "appInfo": {
                    "appId": null,
                    "appName": null,
                    "teaAppId": null,
                    "projectId": null,
                    "subjectId": null
                }
            }
        ]
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HTTP 状态码

错误码

错误信息

说明

400

invalidParameter

PARAMETER INVALID

参数非法,检查入参。