When creating a data archiving ticket, you need to configure variables to define archiving policies, control archiving operations, and set archiving parameters. These variables help automate and optimize the data archiving process, enabling more effective database data management and organization, thereby improving database query performance and business operations.
In the data cleaning and archiving of databases, using variables can greatly enhance the flexibility and configurability of tasks. These variables can be divided into system variables, time variables, and non-time variables, and are dynamically referenced in task nodes in the form of ${varName}.
- Offset time: current time at scheduling + configured time offset. If it is a one-time task, then the scheduling time is the time you click execute.
- The specific offset time is based on execution and may have an error of about 1 to 2 minutes due to scheduling reasons.
- The offset time is in the UTC+8 time zone. You need to calculate the precise time on your own when performing time computations.
- Time offset - means to move forward, + means to move backward. Both + and - are less than time conditions, with examples as follows:
- Configure the scheduled deletion time at 08:00 every morning. Assuming the deletion task is executed at 08:00 AM on October 2, 2024, the time offset configuration and where statement are as follows:
- Time offset configuration - 24 hours, time format yyyy-mm-dd hh:MM:ss, then the generated where condition is time < '2024-10-01 08:00:00'
- Time offset configuration + 24 hours, time format yyyy-mm-dd hh:MM:ss, then the generated where condition is time < '2024-10-03 08:00:00'
- Multiple variables can be configured, which will be entered into the where condition simultaneously using the AND method.
Configuration for time variables
tip
T represents the separator between date and time.</a>
Examples of time format combinations:
Related documentation
Variables are used to define filtering conditions when creating data cleaning and archiving tasks. For details, refer to: