Convert db to metadata-injector compatible format