Skip to content

Clear External Acceleration Partition Data

API Description

This API clears specific partitions of an external materialized table at the metadata layer only. It does not delete physical table data.

⚠️ Note:

  • This operation does not modify data in the real database. It only updates partition-hit metadata inside CAN.

  • After the call, cleared partitions cannot hit materialized data and must be backfilled again.

API URL

POST /anymetrics/api/{version}/accelerate/plan/clearPartition

Request parameters

Common Request Headers

parameter Type required Description
tenant-id String Yes Tenant ID, used to identify the tenant for metric query content.
auth-type String Yes Authentication method. Supports UID, TOKEN, ACCOUNT, and APIKEY.
auth-value String Yes Authentication value corresponding to auth-type.

How to Obtain Common parameters

Obtain this in the top navigation of Aloudata CAN under Metric Applications > API Integration.

image.png

Request parameters

Field Type required Description
uuid String Yes Materialization plan unique ID
timeRange List No Time ranges of materialized partitions to clear

timeRange Item Structure

Field Type Description
dateGranularity String Granularity, such as DAY or MONTH
startTime String Start time in ISO format
endTime String End time in ISO format

Request Example

[
  {
    "dateGranularity": "DAY",
    "startTime": "2025-10-22T00:00:00",
    "endTime": "2025-10-22T00:00:00"
  },
  {
    "dateGranularity": "DAY",
    "startTime": "2025-10-20T00:00:00",
    "endTime": "2025-10-21T00:00:00"
  }
]

Response parameter Description

Field Type Description
data String Fixed value "success" after a successful call
success Boolean Whether the call succeeded
code String Status code
errorMsg String Error message
detailErrorMsg String Detailed error message

Response Example

{
  "data": "success",
  "success": true,
  "code": "200",
  "errorMsg": null
}

Usage Notes

Clearing partitions does not delete physical table data

This API only updates system metadata. It does not clean underlying StarRocks, Doris, Hive, or SparkSQL tables.

Call the API directly for full-refresh tables

If the materialization plan is a full-refresh type:

  • timeRange can be empty

  • After the call, the entire table is marked as unavailable for materialization hits

  • The full table data must be backfilled again