AlterTableTask
ensures that segments remain in sync with the latest Pinot table configuration by detecting inconsistencies, processing changes (such as re-sorting, re-partitioning, or adding indexes), and replacing outdated segments atomically. It acts as an auto-optimizer for the table by transitioning it from its current state to the desired state, ensuring optimal performance.
partition_timeBucket
) and uploads the files to deep storage.fromSegments
from metadata, determines toSegments
from deep storage, and performs batch segment replacement. By default, batch upload is used as it is the most efficient mode.complexTypeConfig
configuration is used as a part of the ingestionConfig
to flatten and process complex-type data. Do not use the Alter Table Task when the complexTypeConfig
configuration is enabled. This may result in records being duplicated and unintended changes to tables.task.taskTypeConfigsMap.StarTreeAlterTableTask
).Parameter | Required | Default Value | Description |
---|---|---|---|
bucketTimePeriod | Yes | 1d | Defines the time interval for creating new segments. Multiple segments can be generated within the same bucketTimePeriod if they exceed the maximum segment size. However, a single segment should never span beyond its assigned bucket period. |
desiredSegmentSize | No | 500MB | Defines the desired output segment size. Larger segments improve query performance by reducing segment lookups, but may increase scan time. |
schedule | Yes | How often to run the task. It should typically be every 10 minutes. |
/alterTable/tableNameWithType/estimatedTime