.done partition guide
Create a .done partition
For more information, see MaxCompute Partitions and Partition operations.
Trigger automatic backflow with a .done partition
iGraph uses a
.donepartition to mark a corresponding data partition as ready for backflow.The
.donepartition is an empty partition with no data. It serves only as an identifier.Example
To mark the partition ds=20160528 as ready for backflow, you can create a corresponding .done partition: ds=20160528.done.
Now, two partitions exist: ds=20160528 and ds=20160528.done. The data is in ds=20160528.
Only numeric partitions are supported. The partition name must use a timestamp format, such as ds=20171111.
Non-numeric partitions, such as ds=abc, are not supported.
The partition field length must be less than 16 bytes.
If the specifications are not followed, the return stream may be incorrect.
The trigger does not activate for
.donepartitions if the generation interval is too short.Each
.donepartition is triggered only once.Empty partitions are not triggered.
For hourly backflow tables, you can use a single-level partition by creating a new .done partition, such as ds=2017101011.done or ds=2017101012.done.
If you use multi-level partitions for hourly backflow tables, ensure that the partition fields are in the correct order. The ds field must come before the hh field.
- Important
1) The
.donesuffix must be at the end of the partition string. For example, 'hh=12.done/ds=20170909' is an incorrect format, while ds=20110101/hh=11.done is a correct format.2) The system does not parse the content of the partition or the meaning of keys such as 'ds', 'dt', or 'hh'. During detection, it only sorts the retrieved partitions in reverse lexicographic order.
Advanced usage: When you pass a MaxCompute partition, you can optionally specify a timestamp for the full data within that partition. This feature is mainly used in full and incremental data scenarios to determine the starting point for catching up on incremental data after a full data switch. To use this feature, specify the .done partition in the following format: ds=20150105.base_timestamp#1505147960.done.
base_timestamp#1505147960specifies the starting timestamp for catching up on incremental data. The timestamp is in seconds.ds=20190606/hh=14.base_timestamp#1559802331.doneis an example of this format for an hourly partition. For tables with full and incremental data, if a timestamp is not specified when the .done partition triggers a backflow, the system uses the trigger time by default. The trigger time is when the .done partition is detected.