After you install the extensions into the Content Acquisition System, you can configure and then run the sample Change Tracking data source in CAS Console.
This data source illustrates an implementation of the
IncrementalDataSourceRuntime
interface. This interface
provides support to check whether a full acquisition is required from the
Change Tracking data source. If a full acquisition is not required, then the
data source provides an implementation of
runIncrementalAcquisition()
to acquire only the
changed records.
To run the sample Change Tracking data source:
Log in to Oracle Commerce Workbench and select the Data Sources page.
On the Data Sources page, click Add Data Source and select Change Tracking Data Source.
In Name, specify a unique name for the data source to distinguish it from others in the CAS Console.
In Database File Path, specify the absolute path to the Change Tracking database in
<install path>\CAS\
.version
\sample\cas-extensions\data\change-tracking-db.xmlWhen the Acquisition Status reads Completed, click on this status to verify that the CAS Server created 3 Endeca records.
If desired, you can confirm that the new records exist in the Record Store instance by running the
read-baseline
task ofrecordstore-cmd
.For example:
C:\Endeca\CAS\<version>\bin>recordstore-cmd read-baseline -a CTTest [DATA=base line data..., Endeca.Id=1, Endeca.Action=UPSERT, Endeca.SourceId=CTTest] [DATA=some incremental data..., Endeca.Id=3, Endeca.Action=UPSERT, Endeca.Source Id=CTTest] [DATA=some incremental data..., Endeca.Id=5, Endeca.Action=UPSERT, Endeca.Source Id=CTTest]
Navigate to
<install path>\CAS\
and openversion
\sample\cas-extensions\datachange-tracking-db.xml
in a text editor.Update one record in the
change-tracking-db.xml
file by doing the following:Add a new
<changeHistory>
entry to the file as shown in the example below.Ensure that the
<key>
value corresponds to an existing<row>
entry in the<database>
.Modify the
<time>
value to indicate a time after the acquisition in step 7 and before the current time. (The time is expressed in UTC format. Seehttp://www.w3.org/TR/NOTE-datetime
for guidance about the syntax.)
For example:
<changeHistory> <key>5</key> <changeType>UPDATE</changeType> <time>2010-02-02T19:19:43.471-05:00</time> </changeHistory>
Acquiring data from this file results in an incremental update to record 5.
Add one record in the
change-tracking-db.xml
file by doing the following:Add a
<row>
entry to the file and ensure the<key>
value is unique, as shown:<row> <key>7</key> <data>some incremental data...</data> </row>
Add a
<changeHistory>
entry for the<row>
as shown:<changeHistory> <key>7</key> <changeType>CREATE</changeType> <time>2010-02-02T19:19:43.471-05:00</time> </changeHistory>
Ensure that the
<key>
value corresponds to a<row>
entry in the<database>
.Modify the
<time>
value to indicate a time after the acquisition in step 7 and before the current time. (The time is expressed in UTC format. Seehttp://www.w3.org/TR/NOTE-datetime
for guidance about the syntax.)
Acquiring data from this file results in an incremental change that adds record 7.
Delete one record in the
change-tracking-db.xml
file by doing the following:Add a
<changeHistory>
entry for the<row>
that has been removed as shown:<changeHistory> <key>8</key> <changeType>DELETE</changeType> <time>2010-02-02T19:19:43.471-05:00</time> </changeHistory>
Ensure that the
<key>
value corresponds to a<row>
that does not exist in the<database>
.Modify the
<time>
value to indicate a time after the acquisition in step 7 and before the current time. (The time is expressed in UTC format. Seehttp://www.w3.org/TR/NOTE-datetime
for guidance about the syntax.)
Acquiring data from this file results in an incremental change that removes record 8.
In CAS Console, run an incremental acquisition by clicking Start.
When the Acquisition Status reads Completed, click on this status to verify that the CAS Server update, added, and deleted the records you modified.