Skip to content

Commit 4f946d6

Browse files
author
zhilingc
committed
Add new spec definitions
1 parent 80224ea commit 4f946d6

3 files changed

Lines changed: 108 additions & 20 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// * Copyright 2019 The Feast Authors
3+
// *
4+
// * Licensed under the Apache License, Version 2.0 (the "License");
5+
// * you may not use this file except in compliance with the License.
6+
// * You may obtain a copy of the License at
7+
// *
8+
// * https://www.apache.org/licenses/LICENSE-2.0
9+
// *
10+
// * Unless required by applicable law or agreed to in writing, software
11+
// * distributed under the License is distributed on an "AS IS" BASIS,
12+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// * See the License for the specific language governing permissions and
14+
// * limitations under the License.
15+
//
16+
17+
syntax = "proto3";
18+
19+
package feast.specs;
20+
21+
option java_package = "feast.specs";
22+
option java_outer_classname = "FeatureSetProto";
23+
option go_package = "github.com/gojek/feast/protos/generated/go/feast/specs";
24+
25+
import "feast/types/Value.proto";
26+
27+
message FeatureSet {
28+
// Name of the featureSet. Must be unique.
29+
string name = 1;
30+
// FeatureSet version.
31+
string version = 2;
32+
// Features contained within this featureSet.
33+
repeated FeatureSpec features = 3;
34+
}
35+
36+
message FeatureSpec {
37+
// Name of the feature.
38+
string name = 1;
39+
// Value type of the feature.
40+
feast.types.ValueType.Enum valueType = 2;
41+
// Describes whether a feature is also a key.
42+
// This allows the feature to be used during joins between feature sets.
43+
// If the featureSet is ingested into a store that supports keys, this value
44+
// will be made a key.
45+
bool isKey = 3;
46+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//
2+
// * Copyright 2019 The Feast Authors
3+
// *
4+
// * Licensed under the Apache License, Version 2.0 (the "License");
5+
// * you may not use this file except in compliance with the License.
6+
// * You may obtain a copy of the License at
7+
// *
8+
// * https://www.apache.org/licenses/LICENSE-2.0
9+
// *
10+
// * Unless required by applicable law or agreed to in writing, software
11+
// * distributed under the License is distributed on an "AS IS" BASIS,
12+
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// * See the License for the specific language governing permissions and
14+
// * limitations under the License.
15+
//
16+
17+
syntax = "proto3";
18+
package feast.specs;
19+
20+
option java_package = "feast.specs";
21+
option java_outer_classname = "ServingStoreProto";
22+
option go_package = "github.com/gojek/feast/protos/generated/go/feast/specs";
23+
24+
message ServingStore {
25+
26+
message StoreType {
27+
enum Enum {
28+
UNKNOWN = 0;
29+
REDIS = 1;
30+
BIGQUERY = 2;
31+
CASSANDRA = 3;
32+
}
33+
}
34+
35+
// Name of the store.
36+
string name = 1;
37+
38+
// Type of store.
39+
ServingStore.StoreType type = 2;
40+
41+
// URI to connect to the database. Should contain all necessary information
42+
// to connect to and write/read to the store.
43+
string databaseURI = 3;
44+
45+
// Feature sets to subscribe to. Regex strings are allowed, in the form of
46+
// featureSetId:version. E.g. my-feature-set:2^
47+
repeated string subscriptions = 4;
48+
}

protos/feast/types/Value.proto

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@ message ValueType {
3434
DOUBLE = 5;
3535
FLOAT = 6;
3636
BOOL = 7;
37-
TIMESTAMP = 8;
37+
BYTES_LIST = 11;
38+
STRING_LIST = 12;
39+
INT32_LIST = 13;
40+
INT64_LIST = 14;
41+
DOUBLE_LIST = 15;
42+
FLOAT_LIST = 16;
43+
BOOL_LIST = 17;
3844
}
3945
}
4046

4147
message Value {
4248
// ValueType is referenced by the metadata types, FeatureInfo and EntityInfo.
4349
// The enum values do not have to match the oneof val field ids, but they should.
44-
4550
oneof val {
4651
bytes bytesVal = 1;
4752
string stringVal = 2;
@@ -50,20 +55,13 @@ message Value {
5055
double doubleVal = 5;
5156
float floatVal = 6;
5257
bool boolVal = 7;
53-
google.protobuf.Timestamp timestampVal = 8;
54-
}
55-
}
56-
57-
message ValueList {
58-
oneof valueList {
59-
BytesList bytesList = 1;
60-
StringList stringList = 2;
61-
Int32List int32List = 3;
62-
Int64List int64List = 4;
63-
DoubleList doubleList = 5;
64-
FloatList floatList = 6;
65-
BoolList boolList = 7;
66-
TimestampList timestampList = 8;
58+
BytesList bytesListVal = 11;
59+
StringList stringListVal = 12;
60+
Int32List int32ListVal = 13;
61+
Int64List int64ListVal = 14;
62+
DoubleList doubleListVal = 15;
63+
FloatList floatListVal = 16;
64+
BoolList boolListVal = 17;
6765
}
6866
}
6967

@@ -94,7 +92,3 @@ message FloatList {
9492
message BoolList {
9593
repeated bool val = 1;
9694
}
97-
98-
message TimestampList {
99-
repeated google.protobuf.Timestamp val = 1;
100-
}

0 commit comments

Comments
 (0)