WebSphere Commerce 7 | Custom Dataload | Check error count in the middle of the dataload

While doing dataloads, the following snippet will be used in wc-dataload.xml's load sequence,

<_config:LoadItem commitCount="20" batchSize="20" dataLoadMode="Replace" maxError="25" name="Sample_CatentryAttributesDataLoad" businessObjectConfigFile="wc-loader-catalog-entry-AD-attribute-relationship.xml">
         <_config:DataSourceLocation location="${dataloadParams}"/>
</_config:LoadItem>

If you are doing custom dataload, some of the records might fail to insert/update because of various reasons like parent key not found, integrity constraint etc

The "maxError" attribute is used specify after how many number of errors, the dataload job has to be aborted.

If you wanted to find out what is error count in the middle of the dataload, you can use the following statement in your custom dataload,

Integer errorCount = (Integer) getConfigProperties().getParentConfigProperties().getAttributeMap().get(DataLoadConstants.DL_ERROR_COUNT);

No comments:

Post a Comment

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...