You need to enable JavaScript to run this app.
导航
PreviewDSL - 查询服务分群预估(接口下线中,不建议进行使用)
最近更新时间:2024.08.09 11:02:14首次发布时间:2024.07.10 15:50:08

请求说明

  • 请求方式:POST
  • 接口名称:PreviewDSL
  • 请求地址: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

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

x-user

String

1

用户名,用于鉴权

Query

参数

类型

是否必选

示例值

描述

ApiAction

String

PreviewDSL

对应“请求说明”中的“接口名称”

ApiVersion

String

2023-08-08

版本号:2023-08-08

tenantCode

String

1

租户Code (请不要填写租户ID,获取方式详见附录)

Body

参数

类型

是否必选

示例值

描述

filter

Object

{
    "filters":
    [
        {
            "filters":
            [
                {
                    "tagId": 356,
                    "operator": "in",
                    "value":
                    [
                        "兴趣"
                    ]
                }
            ],
            "operator": "And"
        }
    ],
    "operator": "And"
}

规则dsl,请参阅DSL编写规则

{
    "filters":
    [
        {
            "filters":
            [
                {
                    "tagId": 356,
                    "operator": "in",
                    "value":
                    [
                        "兴趣"
                    ]
                }
            ],
            "operator": "And"
        }
    ],
    "operator": "And"
}

sourceIdType

Int

baseId的id

返回参数

参数

类型

示例值

描述

code

Int

0

状态码:0 为成功。错误码见附录7.3

msg

String

状态信息

data

String

{
        "count": 0,
        "sql": " select base_id_0 as result from (    select BitMapCount('(0 & 1)')(idx, base_id_1) as base_id_0  from (                             ( select  toInt16(0) as idx,   BitMapExtract('(0~1)
    }

2')(index, temp_id) as base_id_1 from ( select toInt16(0) as index, base_id_2 as temp_id from ( select BitMapColumnOr(id_map) as base_id_2 from ( select id_map,tag_value_double from profile_tob.tag_bitmaps_did_cdp where p_date between '2023-08-03' and '2023-08-03' and tag_type = 1 and id_type = 1 and tag_id = 5 ) where ( toInt64(tag_value_double) = 0 ) ) union all select toInt16(1) as index, temp_id from ( select arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id from ( select id from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' ) ) union all select toInt16(2) as index, temp_id from ( select arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id from ( select id from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' and ( tag_value_bigint = 0 ) ) ) ) ) union all ( select toInt16(1) as idx, BitMapColumnOr(id_map) as base_id_1 from ( select id_map,tag_value from profile_tob.tag_bitmaps_did_cdp where p_date = '1970-01-01' and tag_type = 1 and id_type = 1 and tag_id = 1 ) where tag_value in ('兴趣') ) ) settings distributed_perfect_shard=1, prefer_localhost_replica = 1, load_balancing = 'in_order' ) "
成功或失败信息

请求示例

{
    "filter":
    {
        "filters":
        [
            {
                "filters":
                [
                    {
                        "tagId": 356,
                        "operator": "in",
                        "value":
                        [
                            "兴趣"
                        ]
                    }
                ],
                "operator": "And"
            }
        ],
        "operator": "And"
    }
}

返回示例

{
    "data": {
        "count": 0,
        "sql": " select base_id_0 as result from (    select BitMapCount('(0 & 1)')(idx, base_id_1) as base_id_0  from (                             ( select  toInt16(0) as idx,   BitMapExtract('(0~1)|2')(index, temp_id) as base_id_1  from (   select toInt16(0) as index,   base_id_2 as temp_id    from   ( select  BitMapColumnOr(id_map) as base_id_2  from (     select id_map,tag_value_double          from profile_tob.tag_bitmaps_did_cdp     where  p_date between '2023-08-03' and '2023-08-03'      and tag_type = 1     and id_type = 1     and tag_id = 5 ) where  ( toInt64(tag_value_double) = 0 )  )     union all   select toInt16(1) as index,   temp_id    from ( select   arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id   from ( select id  from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' )  )     union all   select toInt16(2) as index,   temp_id    from ( select   arrayToBitmapWithEncode(groupArray(toUInt64(assumeNotNull(id))), 'profile_tob', 'tag_bitmaps_did_cdp_local', 'id_map',1) as temp_id   from ( select id  from aeolus_label_realtime_result_db.aeolus_label_app_1_entity_type_user_kafka_unique where tag_id = 5 and p_date = '2023-08-04' and  ( tag_value_bigint = 0 ) )  )  )   )                          union all                         ( select  toInt16(1) as idx, BitMapColumnOr(id_map) as base_id_1  from (     select id_map,tag_value          from profile_tob.tag_bitmaps_did_cdp     where  p_date = '1970-01-01'      and tag_type = 1     and id_type = 1     and tag_id = 1 ) where  tag_value in  ('兴趣')   )                          )       settings distributed_perfect_shard=1, prefer_localhost_replica = 1, load_balancing = 'in_order'  ) "
    },
    "traceId": "06d8fe01-87f0-43d6-8349-908d93753b25",
    "code": 0
}

错误码

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

HTTP 状态码

错误码

错误信息

说明

400

invalidParameter

PARAMETER INVALID

参数非法,检查入参。