![]() |
Consumption Analytics Documentation |
If you want to run the same successful job for the same day (that completed successfully without errors or warnings), you must delete the previous job’s data load prior to running it again, otherwise the job will fail with a Duplicate load detected
error. You can also delete detail and summary data from older loads to recover database storage space.
You can delete loads from the Cloud Cruiser Portal or from within a job.
The tasklet DeleteLoadsTasklet
deletes loads. The following shows an example of this tasklet within a job, using a combination of its properties to specify deletion parameters:
<batch:job id="deleteLoadsJob" parent="ccjob"> <batch:step id="deleteLoadsStep" next=""> <batch:tasklet> <bean class="com.cloudcruiser.batch.DeleteLoadsTasklet"> <property name="active" value="true" /> <property name="accountingDateFrom" value="20131101" /> <property name="accountingDateTo" value="20131130" /> <property name="loadDateFrom" value="${env.selectDate}-1" /> <property name="loadDateTo" value="${env.selectDate}" /> <property name="feeds" value="ccrgenerator,transactions" /> <property name="systems" value="gator,fred1,rengstorf" /> <property name="fileType" value="summary" /> </bean> </batch:tasklet> </batch:step> </batch:job>
NOTE: A sample job file is located at <
install_dir >/job_samples/delete_loads.xml
.
By default, running the job with DeleteLoadsTasklet
with no restrictions, with no other property settings except active, will delete all the data records in the summary and detail tables.
<bean class="com.cloudcruiser.batch.DeleteLoadsTasklet"> <property name="active" value="true" /> </bean>
Use the accountingDateFrom
and accountingDateTo
properties to specify the accounting date range of the load data to be deleted with the following syntax:
<property name="accountingDateFrom" value="yyyyMMdd"/> <property name="accountingDateTo" value="yyyyMMdd"/>
Use the loadDateFrom
and loadDateTo
properties to specify the load date range of the data to be deleted with the following syntax:
<property name="loadDateFrom" value="yyyyMMdd"/> <property name="loadDateTo" value="yyyyMMdd"/>
For each date range property set, the FROM date and TO date must be set at the same time, and the TO date cannot be earlier than the FROM date. To delete load data for a single day, use the same date for both FROM and TO values.
Use the following properties to specify one or more source feeds from where the data was loaded. You can a regular pattern expression or a comma-separated feed list.
<property name="feedsPattern" value="feed.*" /> <property name="feeds" value="feedName1,feedName2"/>
Use the following properties to specify one or more source systems from where the data was loaded. You can a regular pattern expression or a comma-separated system list.
<property name="systemsPattern" value="system.*" /> <property name="systems" value="systemName1,systemName2"/>
Use the fileType
property to specify the type of load data to be deleted with the following syntax:
<property name="fileType" value="all|summary|detail"/>
The valid values are all
, summary
, or detail
. Without this property, the default is all
, meaning both summary
and detail
load data types are deleted.
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP