A MongoDB collection is created for every feature. Each collection contains documents with the materialized values for each feature, making them readily accessible at serving time.
First we have to add a declarative MongoDB configuration in Python. The required fields include a name for the provider, and connection information. The specified database will be created during the first feature materialization.
Optionally, maximum throughput can be set when using Cosmos DB for MongoDB with autoscaling.
import featureform as ff
mongo = ff.register_mongodb(
Once our config file is complete, we can apply it to our Featureform deployment
featureform apply mongodb_config.py --host $FEATUREFORM_HOST