File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed 
docs/reference/data-sources Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ The spark data source API allows for the retrieval of historical feature values
1313Using 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
1820my_spark_source =  SparkSource(
1921    table = " FEATURE_TABLE" 
@@ -23,7 +25,9 @@ my_spark_source = SparkSource(
2325Using 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
2832my_spark_source =  SparkSource(
2933    query = " SELECT timestamp as ts, created, f1, f2 " 
@@ -34,7 +38,9 @@ my_spark_source = SparkSource(
3438Using 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
3945my_spark_source =  SparkSource(
4046    path = f " { CURRENT_DIR } /data/driver_hourly_stats " ,
Original file line number Diff line number Diff line change 33from  pkg_resources  import  DistributionNotFound , get_distribution 
44
55from  feast .infra .offline_stores .bigquery_source  import  BigQuerySource 
6- from  feast .infra .offline_stores .contrib .spark_offline_store .spark_source  import  (
7-     SparkSource ,
8- )
96from  feast .infra .offline_stores .file_source  import  FileSource 
107from  feast .infra .offline_stores .redshift_source  import  RedshiftSource 
118from  feast .infra .offline_stores .snowflake_source  import  SnowflakeSource 
5047    "RedshiftSource" ,
5148    "RequestFeatureView" ,
5249    "SnowflakeSource" ,
53-     "SparkSource" ,
5450]
Original file line number Diff line number Diff line change 4242from  feast .data_source  import  DataSource 
4343from  feast .diff .infra_diff  import  InfraDiff , diff_infra_protos 
4444from  feast .diff .registry_diff  import  RegistryDiff , apply_diff_to_registry , diff_between 
45- from  feast .dqm .profilers .ge_profiler  import  GEProfiler 
4645from  feast .entity  import  Entity 
4746from  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. 
Original file line number Diff line number Diff line change 88    FileSource ,
99    RedshiftSource ,
1010    SnowflakeSource ,
11-     SparkSource ,
1211)
1312from  feast .data_source  import  DataSource , RequestDataSource 
1413from  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 ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments