mongo documents to triples