Triggering TTL Events
Function
A TTL event is triggered based on the interval configured using ttl_configuration. However, you can make the TTL go off 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 repalcecommit. When the clean operation is performed, the aged partitions are automatically and physically deleted.
Parameters
|
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. |
Examples
Make a TTL go off and execute the deletion immediately.
call ttl_policy_run(table => "hudi_table", dryRun => false)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.