按特定条件批量删除Collection中的数据
参数名 | 类型 | 必须 | 说明 | 子字段 | 类型 | 必选 | 说明 |
---|---|---|---|---|---|---|---|
task_type | string | 是 | 任务类型,填入 filter_delete | ||||
task_params | map | 是 | 任务参数 | collection_name | string | 是 | Collection 名称,必填 |
filter_conds | map | 是 | 过滤条件,支持 must 、must_nor、range、range_out 算子,使用参考标量过滤
| ||||
need_confirm | bool | 否 | 为false时可跳过人工确认环节,默认为true。为 true 时需要执行 任务更新 接口 | ||||
tos_path | string | 否 | 在实际执行数据删前,将数据备份到指定目录,参考数据导出功能。 | ||||
file_type | string | 否 | 备份文件类型 json 或者 parquet,默认为 parquet |
说明
若要将数据备份至TOS,请先授权 VikingDB 跨服务访问 TOS 去授权
curl -i -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: HMAC-SHA256 ***' \ https://api-vikingdb.volces.com/api/task/create \ -d '{ "task_type": "filter_delete", "task_params": { "collection_name": "example", #colletcion 名称 "filter_conds": [ { "op": "must", "field": "city", "conds": ["beijing"] }, { "op": "range", "field": "user_id", "gt": 0, "lt": 4 }, ] } }'
属性 | 说明 |
---|---|
task_id | uuid |
如果需要人工确认,可执行任务更新操作