Adding Map functions to AggregateMetadata template