DronaBlog

Monday, July 23, 2018

Services Integration Framework – SIF – API – CleansePut


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:

  1. 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.
  2. For the non nullable column, do not insert a null value such as a unique key column.
  3. Values in the read only column cannot be updated or inserted by the CleansePut API.
  4. We can insert or update values in the system columns if the putable property is enabled.
  5. We can use the backslash (\) to escape special characters such as the single quotation mark (') or the tilde (~) in the CleansePut object.
  6. To filter the record we can use the Mappings tool in the Hub Console to include a filter criteria.
  7. 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
 Gets the cleansed record
 getGenerateSourceKey
 Gets the status that indicates whether to generate a source key
 getIsFillOnGap

 getPeriodReferenceDate

 getRecord
 Gets the record to update or insert into a base or dependent object
 getSiperianObjectUid
 Gets the unique ID for the record from SiperianObjectUidProvider.getSiperianObjectUid()
 getSystemName
 The name of the system
 getTimeLineAction

 setGenerateSourceKey(boolean generateSourceKey)
 Sets the status to indicate whether to generate a source key
 setIsFillOnGap(boolean isFillOnGap)

 setPeriodReferenceDate(Date periodReferenceDate)

 setRecord(Record record)
 Sets the record to update or insert into a base or dependent object
 setSystemName(String systemName)
 Sets the name of the system
 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);

 This video below explains how to use Put API in Java -


2 comments:

  1. Hi
    So how do decide weather to use cleanseput or put based on business
    Scenerio.
    Thanks
    Veer

    ReplyDelete
    Replies
    1. Hello Veer, Thank you for posting question here. If business requirement is to handle data standardization while updating or inserting records through SIF API then use cleanseput for all other cases use put. CleansePut takes more time than Put API as it performs cleansing.

      Delete

Please do not enter any spam link in the comment box.

Understanding Survivorship in Informatica IDMC - Customer 360 SaaS

  In Informatica IDMC - Customer 360 SaaS, survivorship is a critical concept that determines which data from multiple sources should be ret...