Skip to content

Commit 6ba7fc7

Browse files
authored
fix: Fix default feast apply path without any extras (#2373)
* fix: Fix default feast apply path without any extras Signed-off-by: Danny Chiao <[email protected]> * revert removing ge Signed-off-by: Danny Chiao <[email protected]>
1 parent a5fbd08 commit 6ba7fc7

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

docs/reference/data-sources/spark.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ The spark data source API allows for the retrieval of historical feature values
1313
Using a table reference from SparkSession(for example, either in memory or a Hive Metastore)
1414

1515
```python
16-
from feast import SparkSource
16+
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
17+
SparkSource,
18+
)
1719

1820
my_spark_source = SparkSource(
1921
table="FEATURE_TABLE",
@@ -23,7 +25,9 @@ my_spark_source = SparkSource(
2325
Using a query
2426

2527
```python
26-
from feast import SparkSource
28+
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
29+
SparkSource,
30+
)
2731

2832
my_spark_source = SparkSource(
2933
query="SELECT timestamp as ts, created, f1, f2 "
@@ -34,7 +38,9 @@ my_spark_source = SparkSource(
3438
Using a file reference
3539

3640
```python
37-
from feast import SparkSource
41+
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
42+
SparkSource,
43+
)
3844

3945
my_spark_source = SparkSource(
4046
path=f"{CURRENT_DIR}/data/driver_hourly_stats",

sdk/python/feast/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
from pkg_resources import DistributionNotFound, get_distribution
44

55
from feast.infra.offline_stores.bigquery_source import BigQuerySource
6-
from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import (
7-
SparkSource,
8-
)
96
from feast.infra.offline_stores.file_source import FileSource
107
from feast.infra.offline_stores.redshift_source import RedshiftSource
118
from feast.infra.offline_stores.snowflake_source import SnowflakeSource
@@ -50,5 +47,4 @@
5047
"RedshiftSource",
5148
"RequestFeatureView",
5249
"SnowflakeSource",
53-
"SparkSource",
5450
]

sdk/python/feast/feature_store.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
from feast.data_source import DataSource
4343
from feast.diff.infra_diff import InfraDiff, diff_infra_protos
4444
from feast.diff.registry_diff import RegistryDiff, apply_diff_to_registry, diff_between
45-
from feast.dqm.profilers.ge_profiler import GEProfiler
4645
from feast.entity import Entity
4746
from feast.errors import (
4847
EntityNotFoundException,
@@ -881,7 +880,6 @@ def create_saved_dataset(
881880
storage: SavedDatasetStorage,
882881
tags: Optional[Dict[str, str]] = None,
883882
feature_service: Optional[FeatureService] = None,
884-
profiler: Optional[GEProfiler] = None,
885883
) -> SavedDataset:
886884
"""
887885
Execute provided retrieval job and persist its outcome in given storage.

sdk/python/feast/inference.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
FileSource,
99
RedshiftSource,
1010
SnowflakeSource,
11-
SparkSource,
1211
)
1312
from feast.data_source import DataSource, RequestDataSource
1413
from feast.errors import RegistryInferenceFailure
@@ -87,8 +86,10 @@ def update_data_sources_with_inferred_event_timestamp_col(
8786
):
8887
# prepare right match pattern for data source
8988
ts_column_type_regex_pattern = ""
90-
if isinstance(data_source, FileSource) or isinstance(
91-
data_source, SparkSource
89+
# TODO(adchia): Move Spark source inference out of this logic
90+
if (
91+
isinstance(data_source, FileSource)
92+
or "SparkSource" == data_source.__class__.__name__
9293
):
9394
ts_column_type_regex_pattern = r"^timestamp"
9495
elif isinstance(data_source, BigQuerySource):

0 commit comments

Comments
 (0)