feast.infra.offline_stores package

Submodules

feast.infra.offline_stores.bigquery module

class feast.infra.offline_stores.bigquery.BigQueryOfflineStore[source]

Bases: feast.infra.offline_stores.offline_store.OfflineStore

static get_historical_features(config: feast.repo_config.RepoConfig, feature_views: List[feast.feature_view.FeatureView], feature_refs: List[str], entity_df: Union[pandas.core.frame.DataFrame, str], registry: feast.registry.Registry, project: str)feast.infra.offline_stores.offline_store.RetrievalJob[source]
static pull_latest_from_table_or_query(data_source: feast.data_source.DataSource, join_key_columns: List[str], feature_name_columns: List[str], event_timestamp_column: str, created_timestamp_column: Optional[str], start_date: datetime.datetime, end_date: datetime.datetime)pyarrow.lib.Table[source]

Note that join_key_columns, feature_name_columns, event_timestamp_column, and created_timestamp_column have all already been mapped to column names of the source table and those column names are the values passed into this function.

class feast.infra.offline_stores.bigquery.BigQueryOfflineStoreConfig(*, type: typing_extensions.Literal[bigquery] = 'bigquery', dataset: pydantic.types.StrictStr = 'feast', project_id: pydantic.types.StrictStr = None)[source]

Bases: feast.repo_config.FeastConfigBaseModel

Offline store config for GCP BigQuery

dataset: pydantic.types.StrictStr

(optional) BigQuery Dataset name for temporary tables

project_id: Optional[pydantic.types.StrictStr]

(optional) GCP project name used for the BigQuery offline store

type: typing_extensions.Literal[bigquery]

Offline store type selector

class feast.infra.offline_stores.bigquery.BigQueryRetrievalJob(query, client, config)[source]

Bases: feast.infra.offline_stores.offline_store.RetrievalJob

to_bigquery(dry_run=False)Optional[str][source]
to_df()[source]

Return dataset as Pandas DataFrame synchronously

class feast.infra.offline_stores.bigquery.FeatureViewQueryContext(name: str, ttl: int, entities: List[str], features: List[str], table_ref: str, event_timestamp_column: str, created_timestamp_column: Optional[str], query: str, table_subquery: str, entity_selections: List[str])[source]

Bases: object

Context object used to template a BigQuery point-in-time SQL query

created_timestamp_column: Optional[str]
entities: List[str]
entity_selections: List[str]
event_timestamp_column: str
features: List[str]
name: str
query: str
table_ref: str
table_subquery: str
ttl: int
feast.infra.offline_stores.bigquery.build_point_in_time_query(feature_view_query_contexts: List[feast.infra.offline_stores.bigquery.FeatureViewQueryContext], min_timestamp: datetime.datetime, max_timestamp: datetime.datetime, left_table_query_string: str, entity_df_event_timestamp_col: str)[source]

Build point-in-time query between each feature view table and the entity dataframe

feast.infra.offline_stores.bigquery.get_feature_view_query_context(feature_refs: List[str], feature_views: List[feast.feature_view.FeatureView], registry: feast.registry.Registry, project: str)List[feast.infra.offline_stores.bigquery.FeatureViewQueryContext][source]

Build a query context containing all information required to template a BigQuery point-in-time SQL query

feast.infra.offline_stores.file module

class feast.infra.offline_stores.file.FileOfflineStore[source]

Bases: feast.infra.offline_stores.offline_store.OfflineStore

static get_historical_features(config: feast.repo_config.RepoConfig, feature_views: List[feast.feature_view.FeatureView], feature_refs: List[str], entity_df: Union[pandas.core.frame.DataFrame, str], registry: feast.registry.Registry, project: str)feast.infra.offline_stores.file.FileRetrievalJob[source]
static pull_latest_from_table_or_query(data_source: feast.data_source.DataSource, join_key_columns: List[str], feature_name_columns: List[str], event_timestamp_column: str, created_timestamp_column: Optional[str], start_date: datetime.datetime, end_date: datetime.datetime)pyarrow.lib.Table[source]

Note that join_key_columns, feature_name_columns, event_timestamp_column, and created_timestamp_column have all already been mapped to column names of the source table and those column names are the values passed into this function.

class feast.infra.offline_stores.file.FileOfflineStoreConfig(*, type: typing_extensions.Literal[file] = 'file')[source]

Bases: feast.repo_config.FeastConfigBaseModel

Offline store config for local (file-based) store

type: typing_extensions.Literal[file]

Offline store type selector

class feast.infra.offline_stores.file.FileRetrievalJob(evaluation_function: Callable)[source]

Bases: feast.infra.offline_stores.offline_store.RetrievalJob

to_df()[source]

Return dataset as Pandas DataFrame synchronously

feast.infra.offline_stores.helpers module

feast.infra.offline_stores.helpers.get_offline_store_from_config(offline_store_config: Any)feast.infra.offline_stores.offline_store.OfflineStore[source]

Get the offline store from offline store config

feast.infra.offline_stores.offline_store module

class feast.infra.offline_stores.offline_store.OfflineStore[source]

Bases: abc.ABC

OfflineStore is an object used for all interaction between Feast and the service used for offline storage of features.

abstract static get_historical_features(config: feast.repo_config.RepoConfig, feature_views: List[feast.feature_view.FeatureView], feature_refs: List[str], entity_df: Union[pandas.core.frame.DataFrame, str], registry: feast.registry.Registry, project: str)feast.infra.offline_stores.offline_store.RetrievalJob[source]
abstract static pull_latest_from_table_or_query(data_source: feast.data_source.DataSource, join_key_columns: List[str], feature_name_columns: List[str], event_timestamp_column: str, created_timestamp_column: Optional[str], start_date: datetime.datetime, end_date: datetime.datetime)pyarrow.lib.Table[source]

Note that join_key_columns, feature_name_columns, event_timestamp_column, and created_timestamp_column have all already been mapped to column names of the source table and those column names are the values passed into this function.

class feast.infra.offline_stores.offline_store.RetrievalJob[source]

Bases: abc.ABC

RetrievalJob is used to manage the execution of a historical feature retrieval

abstract to_df()[source]

Return dataset as Pandas DataFrame synchronously

Module contents