Skip to main content
Version: 0.19.3

Delta table example

from featurestore import Client, DeltaTable

# Initialise feature store client
client = Client("ip:port")
fclient.auth.login()

# Set project specifics
project = client.projects.create("demo")

# Create the delta table source
delta = DeltaTable("<path to delta table>")
delta_schema = client.extract_schema_from_source(delta)

# Register the feature set
my_feature_set = project.feature_sets.register(delta_schema, "feature_set_name", primary_key=["key_name"])

# Ingest to cache
my_feature_set.ingest(delta)

# Retrieve feature set
ref = my_feature_set.retrieve()
ref.download()

How to apply a filter on Delta table

from featurestore import DeltaTable, DeltaTableFilter
delta_table_filter = DeltaTableFilter(column=..., operator=..., value=...)
delta_source = DeltaTable(path=..., filter=delta_table_filter)

Feedback