SetTransactionId
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Sets the transaction ID used for DataFlow data transmission.
Prototype
1 | void SetTransactionId(uint64_t transaction_id) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
transaction_id |
Input |
Transaction ID used for data transmission. If this parameter is set to 0, the custom transaction_id is not used. Instead, the transaction_id is internally auto-generated in auto-increment mode. In data alignment scenarios, transaction_id is used for routing and alignment. |
Returns
None
Exception Handling
None
Constraints
- This function takes effect only when SetContainsNMappingNode is set to true.
- The value of transaction_id can only be 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 customized transaction_id is enabled only when the SetTransactionId API is called and the input value is not 0.
Parent topic: DataFlowInfo Data Types