Saving/appending data
To add data to an existing feature, we use the fs.save_dataframe
function. All data is appended, allowing you to add new data while preserving the existing timeseries values.
The code for this tutorial is available as a Colab notebook.
For example, continuing with the carbon intensity data from the previous tutorial we can write some code to fetch chunks of data and append them to the existing feature.
Now when we call fs.load_dataframe
we can retrieve all of the values we have saved into the feature store as one consolidated dataframe.
If you append timeseries values with timestamps that match existing records in the feature store, the new values will supersede the old data. Behind the scenes, ByteHub keeps both old and new versions of the data and these can be queried using the time travel feature. Detailed information on time travel will follow in another tutorial.
Last updated