Implementation

We are given a collection as part of the configuration. Within this collection, we create a document for every feature. Within this document, we create a collection for every feature variant. We then create one document for each entity in this collection, with a key-value pair representing the value of that feature for the given entity. A metadata table is stored in the same Firestore collection as well to allow the provider to keep track of its own state. Featureform’s scheduler aims to achieve consistency between Firestore’s internal state with the user’s desired state as specified in the metadata service.

Configuration

First we have to add a declarative Firestore configuration in Python. In the following example, only name and credentials are required, but the other parameters are available. Note: “credentials” refers to the file location of the Firestore Configuration (.json).

firestore_config.py
import featureform as ff
ff.register_firestore(
    name = "firestore",
    description = "Example inference store",
    team = "Featureform",
    collection = "",
    projectID = "",
    credentials = ""
)

Once our config file is complete, we can apply it to our Featureform deployment

featureform apply firestore_config.py --host $FEATUREFORM_HOST

We can re-verify that the provider is created by checking the Providers tab of the Feature Registry.

Mutable Configuration Fields

  • description

  • credentials