-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathtest_launcher_abc.py
More file actions
46 lines (44 loc) · 1.46 KB
/
Copy pathtest_launcher_abc.py
File metadata and controls
46 lines (44 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from feast_spark.pyspark.abc import StreamIngestionJobParameters
def test_stream_ingestion_job_hash():
streaming_source = {
"kafka": {
"event_timestamp_column": "event_timestamp",
"bootstrap_servers": "localhost:9092",
"topic": "test",
"format": {
"class_path": "com.test.someprotos",
"json_class": "ProtoFormat",
},
}
}
feature_table = {
"features": [
{"name": "feature_1", "type": "STRING"},
{"name": "feature_2", "type": "STRING"},
],
"entities": [
{"name": "entity_1", "type": "STRING"},
{"name": "entity_2", "type": "STRING"},
],
"project": "someproject",
}
feature_table_with_different_order = {
"features": [
{"name": "feature_2", "type": "STRING"},
{"name": "feature_1", "type": "STRING"},
],
"entities": [
{"name": "entity_2", "type": "STRING"},
{"name": "entity_1", "type": "STRING"},
],
"project": "someproject",
}
param = StreamIngestionJobParameters(
source=streaming_source, feature_table=feature_table, jar=""
)
param_different_order = StreamIngestionJobParameters(
source=streaming_source,
feature_table=feature_table_with_different_order,
jar="",
)
assert param.get_job_hash() == param_different_order.get_job_hash()