Updated on 2026-06-27 GMT+08:00

Triggering TTL Events

Function

A TTL event is triggered based on the interval configured using ttl_configuration. However, you can trigger the TTL immediately.

Syntax

call ttl_policy_run(table => "[table]", path => "[path]", dryRun => [dryRun])
  • If dryRun is true, aged partitions are detected based on the TTL policy configured in the Hudi table and only aged partitions are printed.
  • If dryRun is true, aged partitions are detected based on the TTL policy configured in the Hudi table and only aged partitions are logically deleted. The logical deletion operation generates a replacecommit. When the cleaning operation is performed, the aged partitions are automatically and physically deleted.

Parameter Description

Parameter

Description

Mandatory

table

Table name. Database name.Table name is also supported. The value is a string.

No. Specify either table or path.

path

Absolute path of the table. The value is a string.

No. Specify either table or path.

dryRun

The value is of the Boolean type.

No. The value can be false or true. The default value is false.

Example

Manually trigger a TTL event:

call ttl_policy_run(table => "hudi_table", dryRun => false)