Initial loading of records

The use case for the initial load of records assumes that you are loading records into an empty data domain that has been created in the Oracle Endeca Server.

The initial data load is performed via one or more invocations of the Data Ingest Web Service ingestChanges operation with addRecords, specifying one or more record elements.

Note: The initially-created data domain contains no primary key attribute, and no assignments on primary-key attributes. Therefore, the primary key and assignments on it must be created.
To summarize, the following actions take place during the initial load of records:
  • A PDR for the primary key attribute must be added to the data domain.
  • Some or all of your source records are loaded into the data domain.
  • Assignments on the primary-key attribute are created by using the attribute element inside the record element of the addRecords operation:
    <attribute name="pKey" type="mdex:string">pKeyValue</attribute>
    where pKey is the name of the primary-key attribute (such as partID) and pKeyValue is the value of the primary key for the record that you are adding (such as P775).
An example of a full request is:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns="http://www.endeca.com/MDEX/ingest/2/0" 
  xmlns:ns1="http://www.endeca.com/MDEX/XQuery/2009/09">
 <soapenv:Header/>
 <soapenv:Body>
 <ns:ingestChanges>
  <ns:addRecords>
   <ns:record>
    <ns1:attribute name="mdex-property_Key" type="mdex:string">partID</ns1:attribute>
    <ns1:attribute name="mdex-property_DisplayName" type="mdex:string">Part ID</ns1:attribute>
    <ns1:attribute name="mdex-property_Type" type="mdex:string">mdex:string</ns1:attribute>
    <ns1:attribute name="mdex-property_Language" type="mdex:string">en</ns1:attribute>
    <ns1:attribute name="mdex-property_IsSingleAssign" type="mdex:boolean">false</ns1:attribute>
    <ns1:attribute name="mdex-property_IsUnique" type="mdex:boolean">true</ns1:attribute>
    <ns1:attribute name="mdex-property_IsTextSearchable" type="mdex:boolean">false</ns1:attribute>
    <ns1:attribute name="mdex-property_TextSearchAllowsWildcards" type="mdex:boolean">
     false</ns1:attribute>
    <ns1:attribute name="mdex-property_IsPropertyValueSearchable" type="mdex:boolean">
     true</ns1:attribute>
    <ns1:attribute name="system-navigation_Select" type="mdex:string">single</ns1:attribute>
    <ns1:attribute name="system-navigation_Sorting" type="mdex:string">lexical</ns1:attribute>
    <ns1:attribute name="system-navigation_ShowRecordCounts" type="mdex:boolean">true</ns1:attribute>
    <ns1:attribute name="system-property_GroupMembership" type="mdex:string">
    system_properties</ns1:attribute>
   </ns:record>
 <ns:record>
   <ns1:attribute name="partID" type="mdex:string">P789</ns1:attribute>
   <ns1:attribute name="modelNum" type="mdex:int">2562</ns1:attribute>
   <ns1:attribute name="location" type="mdex:geocode">42.365615 -71.075647</ns1:attribute>
  </ns:record>
 </ns:addRecords>
</ns:ingestChanges></soapenv:Body></soapenv:Envelope>

The request first creates the partID primary-key attribute, and then adds one new record to the data domain with the primary key partID=P789. The request also creates two standard attributes (modelNum and location), because they do not exist in the data domain.

Note: If you submit the ingestChanges request after a Transaction Web Service request that starts an outer transaction, the request must specify the outer transaction ID. If no outer transactions have been started, the ID attribute must be omitted in the request. The example above does not specify the ID and assumes that no outer transactions have been started.

To load records into an empty data domain:

  1. Make sure that you have created an Endeca data domain with the Oracle Endeca Server's endeca-cmd commands and that the data domain has been started.
  2. Create an ingest:ingestChanges request, similar to the example above, and send the request to the Data Ingest Web Service.

    The request is typically created and managed by a ETL client.

  3. After the request is made, check the ingestChangesResponse to determine whether the request was successful.
A successful ingestChangesResponse returned from the above sample request should look like this:
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/2/0">
 <ingest:numPropertiesCreated>2</ingest:numPropertiesCreated>
 <ingest:numRecordsAffected>1</ingest:numRecordsAffected>
 <ingest:numRecordsDeleted>0</ingest:numRecordsDeleted>
</ingest:ingestChangesResponse>