new function: MetadataUpsertion;