The Data Ingest Web Service allows you to rename a standard attribute on records in a running data domain.
You use the replaceAssignments element in an updateRecords to rename attributes.
When you rename an attribute, the Data Ingest Web Service removes the name of the attribute that was previously specified in the mdex-property_Key of the PDR of this attribute, and replaces it with the new name. All records retain assignments on this attribute, and the Dgraph process of the Oracle Endeca Server continues to run.
You can rename any standard attribute on the records in your data domain. You cannot rename a managed attribute (except by renaming the associated standard attribute). You also cannot rename an attribute on any system record, such as PDRs, DDRs, or system attributes that define groups.
You cannot include any other updates inside the updateRecords request for renaming an attribute. Also, if the entire ingestChanges request contains additional updateRecords elements, they cannot be run on the same attribute that is being renamed.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/MDEX/ingest/3/0" xmlns:ns1="http://www.endeca.com/MDEX/XQuery/2009/09"> <soapenv:Header/><soapenv:Body> <ns:ingestChanges> <ns:updateRecords> <ns:recordSpecifier>"mdex-property_Key"='oldName'</ns:recordSpecifier> <ns:replaceAssignments> <ns1:attribute name="mdex-property_Key">newName</ns1:attribute> </ns:replaceAssignments> </ns:updateRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>where:
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.
To rename an attribute:
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0"> <ingest:numPropertiesCreated>0</ingest:numPropertiesCreated> <ingest:numRecordsAffected>1</ingest:numRecordsAffected> <ingest:numRecordsDeleted>0</ingest:numRecordsDeleted> </ingest:ingestChangesResponse>