transaction_id
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Reads and writes transaction IDs in attribute mode.
Prototype
1 2 3 4 | @property def transaction_id(self) @transaction_id.setter def transaction_id(self, new_value) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
new_value |
int |
New value of the transaction ID. If the value is set to 0, the custom transaction_id is not used. Instead, the value of transaction_id is internally auto-generated in auto-increment mode. |
Returns
Attribute of transaction_id
Examples
1 2 3 4 5 | import dataflow as df graph = df.FlowGraph(...) flowinfo = FlowInfo(...) flowinfo.transaction_id = 10 print(flowinfo.transaction_id) |
Constraints
- This function takes effect only when set_contains_n_mapping_node is set to true.
- The value of transaction_id can be only increased. If not set externally, the value of transaction_id starts from 1 in auto-incremented mode.
- An error is reported when the value of transaction_id reaches the value of uint64_max.
- If data alignment is enabled, ensure that the value of transaction_id in each batch of input data is the same. Otherwise, data may be not aligned.
- The value of transaction_id can be defined by users only when it is not set to 0.
Parent topic: dataflow.FlowInfo