Collection metadata for Mongo -- overriding default sampling
In Mongo (and other semi-structured sources), we sample the data in the collection to build up the hierarchy. but there’s a way to override that default sampling method to specify your own. You can specify something like this into the Database properties of the datasource connection:
knowiSettings={"indices":{"resources":{"schemaSample":1000,"schemaQueries":["db['resources'].find().limit(100)","db['resources'].find({\"resourceType\" : \"Patient\", \"@state\" : \"current\"}).limit(10)"]}}}
In the example above, resources is the collection name, and under the schemaQueries, you can add multiple queries — we will roll up the metadata for each query to build up the full metadata profile into the query page.
Please sign in to leave a comment.
0 comments