Skip to main content

Overview

As data governance, compliance, and quality expectations continue to evolve, organizations require more precise tools to manage and maintain data in real-time analytics platforms. The Minion-Based Segment Backfill Task in StarTree Cloud addresses this need by enabling selective deletion and backfill of data in a way that is both powerful and easy to control, without resorting to complex, manual workarounds.

Key Capabilities

Selective Data Deletion

The Backfill Task supports multiple modes to select data for deletion:
  • Time range (e.g., a specific day or hour)
  • Dimension filters (e.g., currency = EUR, region = APAC)
  • Combination of time range and dimension filters
It is recommended to configure one of these criteria for data deletion. If deletion is not required, use the File Ingestion Task instead.

Selective Data Backfill

Users can re-ingest targeted subsets of data, such as corrected records or missing slices, without reprocessing entire partitions or tables.

Atomic and Consistent Updates

Backfill operations are atomic by design. When segment replacement is involved, either all related segments are updated or none are, maintaining table integrity and avoiding partial updates or broken transitions.

How Does it Work?

The Backfill Task is initiated via an ad-hoc execution API and operates on time-partitioned data with all-or-none consistency. It consists of four phases:

1. Segment Selector

Filters segments based on deletion or purge criteria. It identifies full deletions and partial purges, generating tasks with types: Purge, Delete, or Ingest.

2. Segment Purger

Removes specific records from segments using defined filters, without deleting entire segments.

3. Segment Deletor

Completely deletes segments that the Segment Selector marked for removal.

4. Data Ingestor

Uses the FileIngestionTask to bring in new data by creating segments that replace or append to existing ones.

Limitations

Configuration Parameters

If Backfill also needs to ingest new data, it is important to configure the Segment Backfill Task using the File Ingestion Task configuration parameters. A reference table of key Backfill-related configuration parameters is provided below.

Preview with Dry Run

Use dry run before scheduling a Backfill Task. Dry run validates task configs, selects matching segments, estimates generated purge and ingestion tasks, and returns warnings without mutating table data. The dry-run endpoint supports SegmentBackfillTask and SegmentPurgeTask.
Use verbose=false or omit the query parameter when you only need summary counts.

Dry-run response

How to read the output

Treat warnings as blockers unless you intentionally want that outcome. For example, [DELETE_ONLY] means the plan deletes segments without replacement data, and [DIMENSION_SCANS_ALL] means a dimension-only selector must scan all active segments.

Sample Task Configuration

Key Use Case Scenarios

1. Delete a Subset of Table

Remove data/segments for a specific time range.

2. Replace a Subset of the Table

Delete existing data and replace with clean data for a specific time range.

3. Mixed Operation: Delete Some, Replace Others, and Add New Segments

A table has inconsistent data - some segments are invalid and should be removed, some are outdated and need replacing, and new records need to be appended. Perform a combination of:
  • Deleting some segments outright,
  • Replacing a set of segments,
  • Ingesting entirely new segments.

4. Replace Data Matching Multiple Values

Example: currency is EUR or USD
Example: industry is ENERGY or country is Germany
Example: currency is not EUR

5. Replace with Time and Multi-dimension Filter

6. Add New Data or Segments Only

Use the File Ingestion Task when no deletion is needed.

FAQs & Recommendations

No, segment purger performs record-level scans.
No, it’s not supported at the moment.
Yes, Backfill Task can be used for deletion only. A time based or dimension based filter can also be applied for selective deletion.
No, use the File Ingestion Task for that.
No, disable concurrent tasks.
Cluster Health Check dashboard can give insights into Segment sizes and skewness if there is any. Use Alter Table Task after Backfill to optimize the Segment size.