File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 77from feast .field import Field
88from feast .protos .feast .core .DataSource_pb2 import DataSource as DataSourceProto
99
10- SUPPORTED_STREAM_SOURCES = {
11- "KafkaSource" ,
12- "KinesisSource" ,
13- }
10+ SUPPORTED_STREAM_SOURCES = {"KafkaSource" , "KinesisSource" , "PushSource" }
1411
1512
1613class StreamFeatureView (FeatureView ):
Original file line number Diff line number Diff line change 22
33import pytest
44
5+ from feast import PushSource
56from feast .batch_feature_view import BatchFeatureView
67from feast .data_format import AvroFormat
78from feast .data_source import KafkaSource
@@ -50,12 +51,22 @@ def test_create_stream_feature_view():
5051 batch_source = FileSource (path = "some path" ),
5152 )
5253 StreamFeatureView (
53- name = "test batch feature view" ,
54+ name = "test kafka stream feature view" ,
5455 entities = [],
5556 ttl = timedelta (days = 30 ),
5657 source = stream_source ,
5758 )
5859
60+ push_source = PushSource (
61+ name = "push source" , batch_source = FileSource (path = "some path" )
62+ )
63+ StreamFeatureView (
64+ name = "test push source feature view" ,
65+ entities = [],
66+ ttl = timedelta (days = 30 ),
67+ source = push_source ,
68+ )
69+
5970 with pytest .raises (ValueError ):
6071 StreamFeatureView (
6172 name = "test batch feature view" , entities = [], ttl = timedelta (days = 30 )
You can’t perform that action at this time.
0 commit comments