Last changed in 26/12/2024
Valuekeep Integration adopts a version control based on a hashing system. Each pipeline has a version control, that is, it has a hashing key that allows to identify if the information subset (hashset) has still not been integrated or if it suffered any change in the data, requesting a new integration. This hashing technique is applicable to an information segment (hashset), that is, it allows to identify the attributes that make up the hashing key (by ignoring integration requests when the entity suffers changes in attributes that are not a part of the key composition).
This method allows to calculate the pipeline hash, that is, to calculate the hashing of the records that must be considered in an integration pipeline. Internally, after getting the hash, the integration solution confronts this value with the previous one and, if they differ, it considers that the record must be synchronized again.
Method
The method used for that is: POST /api/mytenant/myorganization/integration/pipelines/calchash
Before using the method, it is necessary to create in each Entity being synchronized, three custom attributes. Next, we show an example:
- custom_SourceHash: attribute that saves the data source hashing key, must be of the type "short text".
- custom_TargetHash: attribute that saves the data target hashing key, must be of the type "short text".
- custom_IsSync: attribute that validates if the record will be integrated, must be of the type "Boolean".
An example (Json), of the data structure for the calculation of a pipeline hashing.
{
"Algorithm": "MD5",
"BaseEntity": "BusinessCore.Brands",
"LyncEntities": "BusinessCore.Brands JOIN
BusinessCore.BrandModels ON BusinessCore.Brands.Id =
BusinessCore.BrandModels.BrandId",
"Attributes": "BusinessCore.Brands.BrandKey,
BusinessCore.Brands.Description, BusinessCore.BrandModels.ModelKey,
BusinessCore.BrandModels.Description as ModelDescription",
"Filter": "",
"FieldSourceHash": "custom_SourceHash",
"FieldTargetHash": "custom_TargetHash",
"FieldIsSync": "custom_IsSync"
}
Description of the attributes available on the request:
- Algorithm: identifies the hashing algorithm, when ignored, the system assumes: MD5;
- BaseEntity: identifies the base entity (main table);
- LyncEntities: identifies the related entities, when ignored, the system assumes its own base entity;
- Attributes: identifies the attributes that make up the hashing key (that is, the segment used for the hash calculation);
- Filter: identifies the conditional filter to be applied for the hash calculation;
- FieldSourceHash: identifies the SourceHash attribute, when ignored, the system assumes: custom_SourceHash. This attribute will be used to preserve the calculated value;
- FieldTargetHash: identifies the TargetHash attribute, when ignored, the system assumes: custom_TargetHash;
- FieldSyncHash: identifies the IsSync attribute, when ignored, the system assumes: custom_IsSync. This attribute will be used to control if the record is synchronized (the records are classified for synchronization when the attribute value FieldSourceHash is different from the attribute value FieldTargetHash).
When this method is executed successfully, it returns a Json data structure for the hashing key attributes inserted in "Attributes".
Bookmark or share this article
Obrigado pelo seu voto.
login para deixar a sua opinião.
Obrigado pelo seu feedback. Iremos analisá-lo para continuarmos a melhorar!