Using the OMI_IGNORE_NOTFOUND flag in the OpenMetadata interface

In a reference to SAS Open Metadata (page 126), it says: The UpdateMetadata method allows you to update the properties of existing metadata objects. It returns an error if the metadata object to be updated does not exist unless the OMI_IGNORE_NOTFOUND flag is set (134217728).

Here is my problem, if I specify a flag or I do not specify a flag, I still get the same error: ("SASLibrary: A5X8AHW1.B40000SQ cannot be found in wlibrary container in Foundation repository".)

Here's a snippet that reproduces the error:

import com.sas.meta.SASOMI.IOMI;
import com.sas.metadata.MetadataUtil;
import org.omg.CORBA.StringHolder;

IOMI iOMI = ... // an instance of IOMI connection

StringHolder outputMeta = new StringHolder();

String request = ""
        + "<UpdateMetadata>"
        + "   <Metadata>"
        + "     <SASLibrary Id=\"A5X8AHW1.B40000SQ\"/>"
        + "   </Metadata>"
        + "   <NS>SAS</NS>"
        + "   <Flags>" + (MetadataUtil.OMI_IGNORE_NOTFOUND | MetadataUtil.OMI_TRUSTED_CLIENT | MetadataUtil.OMI_RETURN_LIST) + "</Flags>"
        + "   <Options/>"
        + "</UpdateMetadata>"
        ;

iOMI.DoRequest(request, outputMeta);

      

Any ideas what is going wrong?

+3


source to share


1 answer


In contrast to this document, I only saw the OMI_IGNORE_NOTFOUND flag using the DeleteMetadata method.

The Javadoc also seems to support this by specifying



OMI_IGNORE_NOTFOUND (134217728) This flag is for DeleteMetadata to tell it to ignore objects that are not found so that it does not return on error.

com.sas.metadata.remote.MdOMIUtil Time in the interface field

+1


source







All Articles