airflow.providers.google.cloud.operators.vertex_ai.feature_store

This module contains Google Vertex AI Feature Store operators.

Classes

SyncFeatureViewOperator

Initiate a synchronization operation for a Feature View in Vertex AI Feature Store.

CreateFeatureOnlineStoreOperator

Create the Feature Online store.

GetFeatureOnlineStoreOperator

Get Feature Online store instance.

CreateFeatureViewOperator

Create request for Feature View creation.

GetFeatureViewSyncOperator

Retrieve the status and details of a Feature View synchronization operation.

FetchFeatureValuesOperator

Fetch features data from the Feature View provided.

DeleteFeatureOnlineStoreOperator

Delete the Feature Online store.

DeleteFeatureViewOperator

Delete the Feature View.

Module Contents

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.SyncFeatureViewOperator(*, project_id, location, feature_online_store_id, feature_view_id, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Initiate a synchronization operation for a Feature View in Vertex AI Feature Store.

This operator triggers a sync operation that updates the online serving data for a feature view based on the latest data in the underlying batch source. The sync operation ensures that the online feature values are up-to-date for real-time serving.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_online_store_id (str) – Required. The ID of the online feature store that contains the feature view to be synchronized. This store serves as the online serving layer.

  • feature_view_id (str) – Required. The ID of the feature view to synchronize. This identifies the specific view that needs to have its online values updated from the batch source.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id', 'feature_view_id')[source]
project_id[source]
location[source]
feature_online_store_id[source]
feature_view_id[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.CreateFeatureOnlineStoreOperator(*, project_id, location, feature_online_store_id, feature_online_store, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Create the Feature Online store.

This method initiates VertexAI Feature Online Store creation request. Feature Online Store aims to serve and manage features data as a part of VertexAI MLOps.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_online_store_id (str) – Required. The ID of the online feature store that contains the feature view to be synchronized. This store serves as the online serving layer.

  • feature_online_store (google.cloud.aiplatform_v1beta1.types.FeatureOnlineStore) – FeatureOnlineStore configuration object of the feature online store to be created.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id')[source]
project_id[source]
location[source]
feature_online_store_id[source]
feature_online_store[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.GetFeatureOnlineStoreOperator(*, project_id, location, feature_online_store_id, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Get Feature Online store instance.

This method initiates VertexAI Feature Online Store creation request. Feature Online Store aims to serve and manage features data as a part of VertexAI MLOps.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_online_store_id (str) – Required. The ID of the online feature store that contains the feature view to be synchronized. This store serves as the online serving layer.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id')[source]
project_id[source]
location[source]
feature_online_store_id[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.CreateFeatureViewOperator(*, feature_view_id, feature_view, feature_online_store_id, run_sync_immediately=False, project_id, location, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Create request for Feature View creation.

This method initiates VertexAI Feature View request for the existing Feature Online Store. Feature View represents features and data according to the source provided.

Parameters:
  • feature_view_id (str) – The ID to use for the FeatureView, which will become the final component of the FeatureView’s resource name. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number. The value must be unique within a FeatureOnlineStore.

  • feature_view (google.cloud.aiplatform_v1beta1.types.FeatureView) – The configuration of the FeatureView to create.

  • feature_online_store_id (str) – The ID of the online feature store.

  • run_sync_immediately (bool) – If set to true, one on demand sync will be run immediately, regardless the FeatureView.sync_config.

  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id')[source]
project_id[source]
location[source]
feature_view_id[source]
feature_view[source]
run_sync_immediately = False[source]
feature_online_store_id[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.GetFeatureViewSyncOperator(*, location, feature_view_sync_name, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Retrieve the status and details of a Feature View synchronization operation.

This operator fetches information about a specific feature view sync operation, including its current status, timing information, and synchronization metrics. It’s typically used to monitor the progress of a sync operation initiated by the SyncFeatureViewOperator.

Parameters:
  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_view_sync_name (str) – Required. The full resource name of the feature view sync operation to retrieve. This is typically the return value from a SyncFeatureViewOperator execution.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('location', 'feature_view_sync_name')[source]
location[source]
feature_view_sync_name[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.FetchFeatureValuesOperator(*, feature_view_id, feature_online_store_id, project_id, location, entity_id=None, data_key=None, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Fetch features data from the Feature View provided.

This method fetches data from existing Feature view, filtered by provided (or default) data_key. Helps to retrieve actual features data hosted in the VertexAI Feature Store.

Parameters:
  • entity_id (str | None) – Simple ID to identify Entity to fetch feature values for.

  • feature_view_id (str) – The FeatureView ID to fetch data from.

  • feature_online_store_id (str) – The ID of the online feature store.

  • data_key (google.cloud.aiplatform_v1beta1.types.FeatureViewDataKey | None) – The request key to fetch feature values for.

  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id', 'feature_view_id', 'entity_id')[source]
project_id[source]
location[source]
entity_id = None[source]
feature_view_id[source]
feature_online_store_id[source]
data_key = None[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.DeleteFeatureOnlineStoreOperator(*, project_id, location, feature_online_store_id, force=False, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Delete the Feature Online store.

This method initiates VertexAI Feature Online Store deletion request. There should be no FeatureViews to be deleted successfully.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_online_store_id (str) – Required. The ID of the online feature store that contains the feature view to be synchronized. This store serves as the online serving layer.

  • force (bool) – If set to true, any FeatureViews and Features for this FeatureOnlineStore will also be deleted.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id')[source]
project_id[source]
location[source]
feature_online_store_id[source]
force = False[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

class airflow.providers.google.cloud.operators.vertex_ai.feature_store.DeleteFeatureViewOperator(*, project_id, location, feature_online_store_id, feature_view_id, timeout=DEFAULT, retry=DEFAULT, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator, airflow.providers.google.common.hooks.operation_helpers.OperationHelper

Delete the Feature View.

This method deletes the Feature View from the Feature Online Store.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that contains the feature store. This is used to identify which project’s resources to interact with.

  • location (str) – Required. The location of the feature store (e.g., ‘us-central1’, ‘us-east1’). This specifies the Google Cloud region where the feature store resources are located.

  • feature_online_store_id (str) – Required. The ID of the online feature store that contains the feature view to be synchronized. This store serves as the online serving layer.

  • gcp_conn_id (str) – The connection ID to use for connecting to Google Cloud Platform. Defaults to ‘google_cloud_default’.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials. Can be either a single account or a chain of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account.

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'feature_online_store_id')[source]
project_id[source]
location[source]
feature_online_store_id[source]
feature_view_id[source]
timeout[source]
retry[source]
metadata = ()[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Execute the get feature view sync operation.

Was this entry helpful?