public class StreamFeatureGroup extends FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
| Modifier and Type | Field and Description |
|---|---|
protected FeatureGroupEngine |
featureGroupEngine |
created, creator, deltaStreamerJobConf, deprecated, description, eventTime, expectationsNames, featureGroupEngineBase, features, featureStore, featurestoreId, hudiPrecombineKey, id, location, LOGGER, name, notificationTopicName, onlineEnabled, onlineTopicName, partitionKeys, path, primaryKeys, statisticColumns, statisticsConfig, storageConnector, subject, timeTravelFormat, topicName, type, utils, version| Constructor and Description |
|---|
StreamFeatureGroup() |
StreamFeatureGroup(FeatureStore featureStore,
int id) |
StreamFeatureGroup(FeatureStore featureStore,
@NonNull String name,
Integer version,
String description,
List<String> primaryKeys,
List<String> partitionKeys,
String hudiPrecombineKey,
boolean onlineEnabled,
TimeTravelFormat timeTravelFormat,
List<Feature> features,
StatisticsConfig statisticsConfig,
String onlineTopicName,
String eventTime,
StorageConnector storageConnector,
String path) |
StreamFeatureGroup(Integer id,
String description,
List<Feature> features) |
| Modifier and Type | Method and Description |
|---|---|
BeamProducer |
insertStream()
Ingest a feature data to the online feature store using Beam Pipeline object.
|
BeamProducer |
insertStream(Map<String,String> writeOptions) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
Map<String,String> writeOptions) |
void |
save()
Save the feature group metadata on Hopsworks.
|
void |
save(Map<String,String> writeOptions,
JobConfiguration materializationJobConfiguration)
Save the feature group metadata on Hopsworks.
|
com.logicalclocks.hsfs.beam.constructor.Query |
select(List<String> features)
Select a subset of features of the feature group and return a query object.
|
com.logicalclocks.hsfs.beam.constructor.Query |
selectAll()
Select all features of the feature group and return a query object.
|
com.logicalclocks.hsfs.beam.constructor.Query |
selectExcept(List<String> features)
Select all features including primary key and event time feature of the feature group except provided `features`
and return a query object.
|
com.logicalclocks.hsfs.beam.constructor.Query |
selectExceptFeatures(List<Feature> features)
Select all features including primary key and event time feature of the feature group except provided `features`
and return a query object.
|
com.logicalclocks.hsfs.beam.constructor.Query |
selectFeatures(List<Feature> features)
Select a subset of features of the feature group and return a query object.
|
addTag, checkDeprecated, delete, deleteTag, getAvroSchema, getComplexFeatures, getDeserializedAvroSchema, getDeserializedEncodedAvroSchema, getEncodedAvroSchema, getFeature, getFeatureAvroSchema, getPrimaryKeys, getSubject, getTag, getTags, setDeprecated, unloadSubject, updateDeprecated, updateDeprecated, updateDescription, updateFeatureDescription, updateNotificationTopicName, updateStatisticsConfigprotected FeatureGroupEngine featureGroupEngine
public StreamFeatureGroup(FeatureStore featureStore, @NonNull @NonNull String name, Integer version, String description, List<String> primaryKeys, List<String> partitionKeys, String hudiPrecombineKey, boolean onlineEnabled, TimeTravelFormat timeTravelFormat, List<Feature> features, StatisticsConfig statisticsConfig, String onlineTopicName, String eventTime, StorageConnector storageConnector, String path)
public StreamFeatureGroup()
public StreamFeatureGroup(Integer id, String description, List<Feature> features)
public StreamFeatureGroup(FeatureStore featureStore, int id)
public void save()
throws FeatureStoreException,
IOException
FeatureStoreExceptionIOExceptionpublic void save(Map<String,String> writeOptions, JobConfiguration materializationJobConfiguration) throws FeatureStoreException, IOException
writeOptions - Options to provide to the materialization jobmaterializationJobConfiguration - Resource configuration for the materialization jobFeatureStoreExceptionIOExceptionpublic BeamProducer insertStream() throws Exception
// get feature store handle
FeatureStore fs = HopsworksConnection.builder().build().getFeatureStore();
// get feature group handle
StreamFeatureGroup fg = fs.getStreamFeatureGroup("taxi_ride", 1);
// create Beam pipeline
Pipeline pipeline = Pipeline.create();
pipeline
.apply("read stream from the source", PubsubIO.readStrings().fromTopic(options.getInputTopic()))
.apply("Parse JSON to Beam Rows", JsonToRow.withSchema(schema))
.apply("insert streaming feature data", fg.insertStream());
Exceptionpublic BeamProducer insertStream(Map<String,String> writeOptions) throws Exception
Exceptionpublic Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData) throws Exception
insertStream in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>Exceptionpublic Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, Map<String,String> writeOptions) throws Exception
insertStream in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>Exceptionpublic com.logicalclocks.hsfs.beam.constructor.Query selectFeatures(List<Feature> features)
features - List of Feature meta data objects.public com.logicalclocks.hsfs.beam.constructor.Query select(List<String> features)
features - List of Feature names.public com.logicalclocks.hsfs.beam.constructor.Query selectAll()
public com.logicalclocks.hsfs.beam.constructor.Query selectExceptFeatures(List<Feature> features)
features - List of Feature meta data objects.public com.logicalclocks.hsfs.beam.constructor.Query selectExcept(List<String> features)
features - List of Feature names.Copyright © 2025. All rights reserved.