In the "DDL" based metadata configuration, you can add the DDL for a table and use that as collection. When you use that table, it will be written as collection in the MongoDB. Look at the documentation on MongoDB translator on how to do this MongoDB Translator · Teiid Documentation
I have already read the Mongodb Translator documentation but i did not find a java example that illustrates how to add a new Mongodb collection to metadata; since i'm using Teiid embedded.
From your other post Teiid Embedded connect to Mongodb if you add following to the code I provided it will work
String ddl = "CREATE FOREIGN TABLE Customer ( customer_id integer, FirstName varchar(25), LastName varchar(25) ) OPTIONS(UPDATABLE 'TRUE');"; modelMetaData.addSourceMetadata("DDL", ddl);
This adds a collection called Customer. It does not matter embedded or server, metadata is same both places.