Skip to main content
Version: 0.19.3

Retrieve API

To retrieve the data, first run:

ref = fs.retrieve(start_date_time=None, end_date_time=None)

Parameters explanation:

If start_date_time and end_date_time are empty, all ingested data are fetched. Otherwise, these parameters are used to retrieve only a specific range of ingested data. For example, when ingested data are in a time range between T1 <= T2, start_date_time can have any value T3 and end_date_time can have any value T4, where T1 <= T3 <= T4 <= T2.

This call returns immediately with a retrieve holder allowing you to use multiple approaches on how to retrieve the data. Based on the input parameters, the specific call for data retrieval searches the cache and tries to find the ingested data.

Downloading the files from Feature Store

You can download the data to your local machine by:

Blocking approach:

dir = ref.download()

Non-Blocking approach:

future = ref.download_async()
note

More information about asynchronous methods is available at Asynchronous methods.

This will download all produced data files (parquet) into a newly created directory.

Obtaining data as a Spark Frame

You can also read the data from the retrieve call directly as a Spark frame:

ref = my_feature_set.retrieve()
data_frame = ref.as_spark_frame(spark_session)

Read more about Spark Dependencies in the Spark dependencies section.

Retrieving from online

To retrieve data from the online Feature Store, run:

json = feature_set.retrieve_online(key)

The key represents a specific primary key value for which the entry is obtained.


Feedback