Hello All,

We encountered an issue where we can’t add new fields into MongoDB collection, 
using MetaModel api because of schema validation.

Initially in accounts table we have three fields [_id, name, createdDate] and 
MetaModel is succesfully identified them by sampling.
DataSet ds = dc.query()
        .from("accounts")
        .selectAll()
        .execute();
System.out.println(ds.toRows()); // [_id, name, createdDate]

dc.executeUpdate((c) -> {
    c.insertInto("accounts")
            //.value("_id", 123)   _id will be autogenerated
            .value("name", "default")
            .value("createdDate", new Date())
            .value("active", false)
            .execute();
});
After creating new document with the NEW active field, it complies = No such 
column in table: active

I understand that schema validation step is required for RDBMS sources, and 
therefore MetaModel API requires it. 
But is there simple way to bypass this check?

Reply via email to