Purpose of the CleansePut API:
The CleansePut API is used to insert or update a record into a
base or dependent child base object in a single request. It increases the
performance by reducing the number of round trips between the client and the
MDM Hub.
How does it work?
- During the CleansePut processing all records go through the stage batch process and the load batch process in a single request.
- The data is transferred from a landing table to the staging table associated with a specific base object.
- During this transfer of data cleansing happens if cleansing is defined.
- The mapping created in the MDM hub has a link between the landing table and the staging table along with the data cleaning function.
- This mapping name is used to determine the landing and the staging table structure.
- After successful processing of the stage job, the load batch process will be started which transfers data from a staging table to the corresponding target table or the base object in the Hub Store.
- In order to determine a base object or dependent child table name, the staging table associated with the mapping is used.
- Even though data is processed through the stage batch, it does not use the landing and staging tables.
What is role of stage management during CleansePut request?
If state management is enabled then we can specify the
initial state of the record in the HUB_STATE_IND column of the mapping. Valid
values in the HUB_STATE_IND column:
- 1 (ACTIVE)
- 0 (PENDING)
- -1 (DELETED)
Default value is 1 when you insert a new record. We cannot
use the HUB_STATE_IND column of the mapping to specify the state change while
updating the record.
Important points:
- Null values can be processed by both the PutRequest and CleansePut APIs. For example, if we do not specify a value for a request, null value will be set.
- For the non nullable column, do not insert a null value such as a unique key column.
- Values in the read only column cannot be updated or inserted by the CleansePut API.
- We can insert or update values in the system columns if the putable property is enabled.
- We can use the backslash (\) to escape special characters such as the single quotation mark (') or the tilde (~) in the CleansePut object.
- To filter the record we can use the Mappings tool in the Hub Console to include a filter criteria.
- The CleansePut API can use delta detection on the staging table. Data will be filtered if the input data does not differ from the existing data.
Methods
Method
Name
|
Description
|
getCleanseData
|
|
getGenerateSourceKey
|
|
getIsFillOnGap
|
|
getPeriodReferenceDate
|
|
getRecord
|
|
getSiperianObjectUid
|
|
getSystemName
|
|
getTimeLineAction
|
|
setGenerateSourceKey(boolean generateSourceKey)
|
|
setIsFillOnGap(boolean isFillOnGap)
|
|
setPeriodReferenceDate(Date periodReferenceDate)
|
|
setRecord(Record record)
|
|
setSystemName(String systemName)
|
|
setTimeLineAction(int timeLineAction)
|
Java Sample Example
In the example below, the record with the ROWID_OBJECT = 1000 gets updated and it uses the Stage SRC1 Party mapping:
CleansePut request = new CleansePut ();
Record record = new Record();
record.setSiperianObjectUid("MAPPING.Stage SRC1 Party");
record.setField( new Field("PARTY_ID", "1000") );
record.setField( new Field("FULL_NM", "Ross Paul") );
record.setField( new Field("TAXID", "123456") );
record.setField( new Field("LAST_UPDATE_DATE", new Date()) );
request.setRecord( record );
CleansePutResponse response = (CleansePutResponse) sipClient.process(request);