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 7
7
from feast .field import Field
8
8
from feast .protos .feast .core .DataSource_pb2 import DataSource as DataSourceProto
9
9
10
- SUPPORTED_STREAM_SOURCES = {
11
- "KafkaSource" ,
12
- "KinesisSource" ,
13
- }
10
+ SUPPORTED_STREAM_SOURCES = {"KafkaSource" , "KinesisSource" , "PushSource" }
14
11
15
12
16
13
class StreamFeatureView (FeatureView ):
Original file line number Diff line number Diff line change 2
2
3
3
import pytest
4
4
5
+ from feast import PushSource
5
6
from feast .batch_feature_view import BatchFeatureView
6
7
from feast .data_format import AvroFormat
7
8
from feast .data_source import KafkaSource
@@ -50,12 +51,22 @@ def test_create_stream_feature_view():
50
51
batch_source = FileSource (path = "some path" ),
51
52
)
52
53
StreamFeatureView (
53
- name = "test batch feature view" ,
54
+ name = "test kafka stream feature view" ,
54
55
entities = [],
55
56
ttl = timedelta (days = 30 ),
56
57
source = stream_source ,
57
58
)
58
59
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
+
59
70
with pytest .raises (ValueError ):
60
71
StreamFeatureView (
61
72
name = "test batch feature view" , entities = [], ttl = timedelta (days = 30 )
You can’t perform that action at this time.
0 commit comments