:py:mod:`abacusai.feature_group`
================================

.. py:module:: abacusai.feature_group


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   abacusai.feature_group.FeatureGroup




.. py:class:: FeatureGroup(client, modificationLock=None, featureGroupId=None, name=None, featureGroupSourceType=None, tableName=None, sql=None, datasetId=None, functionSourceCode=None, functionName=None, sourceTables=None, createdAt=None, description=None, featureGroupType=None, sqlError=None, latestVersionOutdated=None, tags=None, primaryKey=None, updateTimestampKey=None, lookupKeys=None, streamingEnabled=None, featureGroupUse=None, incremental=None, mergeConfig=None, transformConfig=None, samplingConfig=None, cpuSize=None, memory=None, streamingReady=None, featureTags=None, moduleName=None, templateBindings=None, featureExpression=None, useOriginalCsvNames=None, pythonFunctionBindings=None, pythonFunctionName=None, annotationConfig=None, features={}, duplicateFeatures={}, pointInTimeGroups={}, concatenationConfig={}, indexingConfig={}, codeSource={}, featureGroupTemplate={}, latestFeatureGroupVersion={})

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param modificationLock:
   :type modificationLock: bool
   :param featureGroupId:
   :type featureGroupId: str
   :param name:
   :type name: str
   :param featureGroupSourceType:
   :type featureGroupSourceType: str
   :param tableName:
   :type tableName: str
   :param sql:
   :type sql: str
   :param datasetId:
   :type datasetId: str
   :param functionSourceCode:
   :type functionSourceCode: str
   :param functionName:
   :type functionName: str
   :param sourceTables:
   :type sourceTables: list
   :param createdAt:
   :type createdAt: str
   :param description:
   :type description: str
   :param featureGroupType:
   :type featureGroupType: str
   :param sqlError:
   :type sqlError: str
   :param latestVersionOutdated:
   :type latestVersionOutdated: bool
   :param tags:
   :type tags: list
   :param primaryKey:
   :type primaryKey: str
   :param updateTimestampKey:
   :type updateTimestampKey: str
   :param lookupKeys:
   :type lookupKeys: list
   :param streamingEnabled:
   :type streamingEnabled: bool
   :param featureGroupUse:
   :type featureGroupUse: str
   :param incremental:
   :type incremental: bool
   :param mergeConfig:
   :type mergeConfig: dict
   :param transformConfig:
   :type transformConfig: dict
   :param samplingConfig:
   :type samplingConfig: dict
   :param cpuSize:
   :type cpuSize: str
   :param memory:
   :type memory: number(integer)
   :param streamingReady:
   :type streamingReady: bool
   :param featureTags:
   :type featureTags: dict
   :param moduleName:
   :type moduleName: str
   :param templateBindings:
   :type templateBindings: list
   :param featureExpression:
   :type featureExpression: str
   :param useOriginalCsvNames:
   :type useOriginalCsvNames: bool
   :param pythonFunctionBindings:
   :type pythonFunctionBindings: list
   :param pythonFunctionName:
   :type pythonFunctionName: str
   :param annotationConfig:
   :type annotationConfig: dict
   :param features:
   :type features: Feature
   :param duplicateFeatures:
   :type duplicateFeatures: Feature
   :param pointInTimeGroups:
   :type pointInTimeGroups: PointInTimeGroup
   :param latestFeatureGroupVersion:
   :type latestFeatureGroupVersion: FeatureGroupVersion
   :param concatenationConfig:
   :type concatenationConfig: ConcatenationConfig
   :param indexingConfig:
   :type indexingConfig: IndexingConfig
   :param codeSource:
   :type codeSource: CodeSource
   :param featureGroupTemplate:
   :type featureGroupTemplate: FeatureGroupTemplate

   .. py:method:: __repr__()

      Return repr(self).


   .. py:method:: to_dict()

      Get a dict representation of the parameters in this class

      :returns: The dict value representation of the class parameters
      :rtype: dict


   .. py:method:: add_to_project(project_id, feature_group_type = 'CUSTOM_TABLE', feature_group_use = None)

      Adds a feature group to a project,

      :param project_id: The unique ID associated with the project.
      :type project_id: str
      :param feature_group_type: The feature group type of the feature group. The type is based on the use case under which the feature group is being created. For example, Catalog Attributes can be a feature group type under personalized recommendation use case.
      :type feature_group_type: str
      :param feature_group_use: The user assigned feature group use which allows for organizing project feature groups  DATA_WRANGLING,  TRAINING_INPUT,  BATCH_PREDICTION_INPUT
      :type feature_group_use: str


   .. py:method:: remove_from_project(project_id)

      Removes a feature group from a project.

      :param project_id: The unique ID associated with the project.
      :type project_id: str


   .. py:method:: set_type(project_id, feature_group_type = 'CUSTOM_TABLE')

      Update the feature group type in a project. The feature group must already be added to the project.

      :param project_id: The unique ID associated with the project.
      :type project_id: str
      :param feature_group_type: The feature group type to set the feature group as. The type is based on the use case under which the feature group is being created. For example, Catalog Attributes can be a feature group type under personalized recommendation use case.
      :type feature_group_type: str


   .. py:method:: use_for_training(project_id, use_for_training = True)

      Use the feature group for model training input

      :param project_id: The unique ID associated with the project.
      :type project_id: str
      :param use_for_training: Boolean variable to include or exclude a feature group from a model's training. Only one feature group per type can be used for training
      :type use_for_training: bool


   .. py:method:: describe_annotation(feature_name = None, doc_id = None, feature_group_row_identifier = None)

      Get the latest annotation entry for a given feature group, feature, and document.

      :param feature_name: The name of the feature the annotation is on.
      :type feature_name: str
      :param doc_id: The ID of the primary document the annotation is on.
      :type doc_id: str
      :param feature_group_row_identifier: The key value of the feature group row the annotation is on (cast to string). Usually the primary key value. At least one of the doc_id or key value must be provided so that the correct annotation can be identified.
      :type feature_group_row_identifier: str

      :returns: The latest annotation entry for the given feature group, feature, and document and/or annotation key value
      :rtype: AnnotationEntry


   .. py:method:: create_sampling(table_name, sampling_config, description = None)

      Creates a new feature group defined as a sample of rows from another feature group.

      For efficiency, sampling is approximate unless otherwise specified. (E.g. the number of rows may vary slightly from what was requested).


      :param table_name: The unique name to be given to this sampling feature group.
      :type table_name: str
      :param sampling_config: JSON object (aka map) defining the sampling method and its parameters.
      :type sampling_config: dict
      :param description: A human-readable description of this feature group.
      :type description: str

      :returns: The created feature group.
      :rtype: FeatureGroup


   .. py:method:: set_sampling_config(sampling_config)

      Set a FeatureGroup’s sampling to the config values provided, so that the rows the FeatureGroup returns will be a sample of those it would otherwise have returned.

      Currently, sampling is only for Sampling FeatureGroups, so this API only allows calling on that kind of FeatureGroup.


      :param sampling_config: A json object string specifying the sampling method and parameters specific to that sampling method. Empty sampling_config means no sampling.
      :type sampling_config: dict

      :returns: The updated feature group.
      :rtype: FeatureGroup


   .. py:method:: set_merge_config(merge_config)

      Set a MergeFeatureGroup’s merge config to the values provided, so that the feature group only returns a bounded range of an incremental dataset.

      :param merge_config: A json object string specifying the merge rule. An empty mergeConfig will default to only including the latest Dataset Version.
      :type merge_config: dict


   .. py:method:: set_transform_config(transform_config)

      Set a TransformFeatureGroup’s transform config to the values provided.

      :param transform_config: A json object string specifying the pre-defined transformation.
      :type transform_config: dict


   .. py:method:: set_schema(schema)

      Creates a new schema and points the feature group to the new feature group schema id.

      :param schema: An array of json objects with 'name' and 'dataType' properties.
      :type schema: list


   .. py:method:: get_schema(project_id = None)

      Returns a schema given a specific FeatureGroup in a project.

      :param project_id: The unique ID associated with the project.
      :type project_id: str

      :returns: An array of objects for each column in the specified feature group.
      :rtype: Feature


   .. py:method:: create_feature(name, select_expression)

      Creates a new feature in a Feature Group from a SQL select statement

      :param name: The name of the feature to add
      :type name: str
      :param select_expression: SQL select expression to create the feature
      :type select_expression: str

      :returns: A feature group object with the newly added feature.
      :rtype: FeatureGroup


   .. py:method:: add_tag(tag)

      Adds a tag to the feature group

      :param tag: The tag to add to the feature group
      :type tag: str


   .. py:method:: remove_tag(tag)

      Removes a tag from the feature group

      :param tag: The tag to add to the feature group
      :type tag: str


   .. py:method:: add_annotatable_feature(name, annotation_type)

      :param name:
      :type name: str
      :param annotation_type:
      :type annotation_type: str

      :returns: None
      :rtype: FeatureGroup


   .. py:method:: set_feature_as_annotatable_feature(feature_name, annotation_type, feature_group_row_identifier_feature = None, doc_id_feature = None)

      :param feature_name:
      :type feature_name: str
      :param annotation_type:
      :type annotation_type: str
      :param feature_group_row_identifier_feature:
      :type feature_group_row_identifier_feature: str
      :param doc_id_feature:
      :type doc_id_feature: str

      :returns: None
      :rtype: FeatureGroup


   .. py:method:: unset_feature_as_annotatable_feature(feature_name)

      :param feature_name:
      :type feature_name: str

      :returns: None
      :rtype: FeatureGroup


   .. py:method:: add_annotation_label(label_name, annotation_type, label_definition = None)

      :param label_name:
      :type label_name: str
      :param annotation_type:
      :type annotation_type: str
      :param label_definition:
      :type label_definition: str

      :returns: None
      :rtype: FeatureGroup


   .. py:method:: remove_annotation_label(label_name)

      :param label_name:
      :type label_name: str

      :returns: None
      :rtype: FeatureGroup


   .. py:method:: add_feature_tag(feature, tag)

      :param feature:
      :type feature: str
      :param tag:
      :type tag: str


   .. py:method:: remove_feature_tag(feature, tag)

      :param feature:
      :type feature: str
      :param tag:
      :type tag: str


   .. py:method:: create_nested_feature(nested_feature_name, table_name, using_clause, where_clause = None, order_clause = None)

      Creates a new nested feature in a feature group from a SQL statements to create a new nested feature.

      :param nested_feature_name: The name of the feature.
      :type nested_feature_name: str
      :param table_name: The table name of the feature group to nest
      :type table_name: str
      :param using_clause: The SQL join column or logic to join the nested table with the parent
      :type using_clause: str
      :param where_clause: A SQL where statement to filter the nested rows
      :type where_clause: str
      :param order_clause: A SQL clause to order the nested rows
      :type order_clause: str

      :returns: A feature group object with the newly added nested feature.
      :rtype: FeatureGroup


   .. py:method:: update_nested_feature(nested_feature_name, table_name = None, using_clause = None, where_clause = None, order_clause = None, new_nested_feature_name = None)

      Updates a previously existing nested feature in a feature group.

      :param nested_feature_name: The name of the feature to be updated.
      :type nested_feature_name: str
      :param table_name: The name of the table.
      :type table_name: str
      :param using_clause: The SQL join column or logic to join the nested table with the parent
      :type using_clause: str
      :param where_clause: A SQL where statement to filter the nested rows
      :type where_clause: str
      :param order_clause: A SQL clause to order the nested rows
      :type order_clause: str
      :param new_nested_feature_name: New name for the nested feature.
      :type new_nested_feature_name: str

      :returns: A feature group object with the updated nested feature.
      :rtype: FeatureGroup


   .. py:method:: delete_nested_feature(nested_feature_name)

      Delete a nested feature.

      :param nested_feature_name: The name of the feature to be updated.
      :type nested_feature_name: str

      :returns: A feature group object without the deleted nested feature.
      :rtype: FeatureGroup


   .. py:method:: create_point_in_time_feature(feature_name, history_table_name, aggregation_keys, timestamp_key, historical_timestamp_key, expression, lookback_window_seconds = None, lookback_window_lag_seconds = 0, lookback_count = None, lookback_until_position = 0)

      Creates a new point in time feature in a feature group using another historical feature group, window spec and aggregate expression.

      We use the aggregation keys, and either the lookbackWindowSeconds or the lookbackCount values to perform the window aggregation for every row in the current feature group.
      If the window is specified in seconds, then all rows in the history table which match the aggregation keys and with historicalTimeFeature >= lookbackStartCount and < the value
      of the current rows timeFeature are considered. An option lookbackWindowLagSeconds (+ve or -ve) can be used to offset the current value of the timeFeature. If this value
      is negative, we will look at the future rows in the history table, so care must be taken to make sure that these rows are available in the online context when we are performing
      a lookup on this feature group. If window is specified in counts, then we order the historical table rows aligning by time and consider rows from the window where
      the rank order is >= lookbackCount and includes the row just prior to the current one. The lag is specified in term of positions using lookbackUntilPosition.


      :param feature_name: The name of the feature to create
      :type feature_name: str
      :param history_table_name: The table name of the history table.
      :type history_table_name: str
      :param aggregation_keys: List of keys to use for join the historical table and performing the window aggregation.
      :type aggregation_keys: list
      :param timestamp_key: Name of feature which contains the timestamp value for the point in time feature
      :type timestamp_key: str
      :param historical_timestamp_key: Name of feature which contains the historical timestamp.
      :type historical_timestamp_key: str
      :param expression: SQL Aggregate expression which can convert a sequence of rows into a scalar value.
      :type expression: str
      :param lookback_window_seconds: If window is specified in terms of time, number of seconds in the past from the current time for start of the window.
      :type lookback_window_seconds: float
      :param lookback_window_lag_seconds: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window. If it is negative, we are looking at the "future" rows in the history table.
      :type lookback_window_lag_seconds: float
      :param lookback_count: If window is specified in terms of count, the start position of the window (0 is the current row)
      :type lookback_count: int
      :param lookback_until_position: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
      :type lookback_until_position: int

      :returns: A feature group object with the newly added nested feature.
      :rtype: FeatureGroup


   .. py:method:: update_point_in_time_feature(feature_name, history_table_name = None, aggregation_keys = None, timestamp_key = None, historical_timestamp_key = None, expression = None, lookback_window_seconds = None, lookback_window_lag_seconds = None, lookback_count = None, lookback_until_position = None, new_feature_name = None)

      Updates an existing point in time feature in a feature group. See createPointInTimeFeature for detailed semantics.

      :param feature_name: The name of the feature.
      :type feature_name: str
      :param history_table_name: The table name of the history table. If not specified, we use the current table to do a self join.
      :type history_table_name: str
      :param aggregation_keys: List of keys to use for join the historical table and performing the window aggregation.
      :type aggregation_keys: list
      :param timestamp_key: Name of feature which contains the timestamp value for the point in time feature
      :type timestamp_key: str
      :param historical_timestamp_key: Name of feature which contains the historical timestamp.
      :type historical_timestamp_key: str
      :param expression: SQL Aggregate expression which can convert a sequence of rows into a scalar value.
      :type expression: str
      :param lookback_window_seconds: If window is specified in terms of time, number of seconds in the past from the current time for start of the window.
      :type lookback_window_seconds: float
      :param lookback_window_lag_seconds: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window. If it is negative, we are looking at the "future" rows in the history table.
      :type lookback_window_lag_seconds: float
      :param lookback_count: If window is specified in terms of count, the start position of the window (0 is the current row)
      :type lookback_count: int
      :param lookback_until_position: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
      :type lookback_until_position: int
      :param new_feature_name: New name for the point in time feature.
      :type new_feature_name: str

      :returns: A feature group object with the newly added nested feature.
      :rtype: FeatureGroup


   .. py:method:: create_point_in_time_group(group_name, window_key, aggregation_keys, history_table_name = None, history_window_key = None, history_aggregation_keys = None, lookback_window = None, lookback_window_lag = 0, lookback_count = None, lookback_until_position = 0)

      Create point in time group

      :param group_name: The name of the point in time group
      :type group_name: str
      :param window_key: Name of feature to use for ordering the rows on the source table
      :type window_key: str
      :param aggregation_keys: List of keys to perform on the source table for the window aggregation.
      :type aggregation_keys: list
      :param history_table_name: The table to use for aggregating, if not provided, the source table will be used
      :type history_table_name: str
      :param history_window_key: Name of feature to use for ordering the rows on the history table. If not provided, the windowKey from the source table will be used
      :type history_window_key: str
      :param history_aggregation_keys: List of keys to use for join the historical table and performing the window aggregation. If not provided, the aggregationKeys from the source table will be used. Must be the same length and order as the source table's aggregationKeys
      :type history_aggregation_keys: list
      :param lookback_window: Number of seconds in the past from the current time for start of the window. If 0, the lookback will include all rows.
      :type lookback_window: float
      :param lookback_window_lag: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window. If it is negative, we are looking at the "future" rows in the history table.
      :type lookback_window_lag: float
      :param lookback_count: If window is specified in terms of count, the start position of the window (0 is the current row)
      :type lookback_count: int
      :param lookback_until_position: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
      :type lookback_until_position: int

      :returns: The feature group after the point in time group has been created
      :rtype: FeatureGroup


   .. py:method:: update_point_in_time_group(group_name, window_key = None, aggregation_keys = None, history_table_name = None, history_window_key = None, history_aggregation_keys = None, lookback_window = None, lookback_window_lag = None, lookback_count = None, lookback_until_position = None)

      Update point in time group

      :param group_name: The name of the point in time group
      :type group_name: str
      :param window_key: Name of feature which contains the timestamp value for the point in time feature
      :type window_key: str
      :param aggregation_keys: List of keys to use for join the historical table and performing the window aggregation.
      :type aggregation_keys: list
      :param history_table_name: The table to use for aggregating, if not provided, the source table will be used
      :type history_table_name: str
      :param history_window_key: Name of feature to use for ordering the rows on the history table. If not provided, the windowKey from the source table will be used
      :type history_window_key: str
      :param history_aggregation_keys: List of keys to use for join the historical table and performing the window aggregation. If not provided, the aggregationKeys from the source table will be used. Must be the same length and order as the source table's aggregationKeys
      :type history_aggregation_keys: list
      :param lookback_window: Number of seconds in the past from the current time for start of the window.
      :type lookback_window: float
      :param lookback_window_lag: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window. If it is negative, we are looking at the "future" rows in the history table.
      :type lookback_window_lag: float
      :param lookback_count: If window is specified in terms of count, the start position of the window (0 is the current row)
      :type lookback_count: int
      :param lookback_until_position: Optional lag to offset the closest point for the window. If it is positive, we delay the start of window by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
      :type lookback_until_position: int

      :returns: The feature group after the update has been applied
      :rtype: FeatureGroup


   .. py:method:: delete_point_in_time_group(group_name)

      Delete point in time group

      :param group_name: The name of the point in time group
      :type group_name: str

      :returns: The feature group after the point in time group has been deleted
      :rtype: FeatureGroup


   .. py:method:: create_point_in_time_group_feature(group_name, name, expression)

      Create point in time group feature

      :param group_name: The name of the point in time group
      :type group_name: str
      :param name: The name of the feature to add to the point in time group
      :type name: str
      :param expression: SQL Aggregate expression which can convert a sequence of rows into a scalar value.
      :type expression: str

      :returns: The feature group after the update has been applied
      :rtype: FeatureGroup


   .. py:method:: update_point_in_time_group_feature(group_name, name, expression)

      Update a feature's SQL expression in a point in time group

      :param group_name: The name of the point in time group
      :type group_name: str
      :param name: The name of the feature to add to the point in time group
      :type name: str
      :param expression: SQL Aggregate expression which can convert a sequence of rows into a scalar value.
      :type expression: str

      :returns: The feature group after the update has been applied
      :rtype: FeatureGroup


   .. py:method:: set_feature_type(feature, feature_type)

      Set a feature's type in a feature group/. Specify the feature group ID, feature name and feature type, and the method will return the new column with the resulting changes reflected.

      :param feature: The name of the feature.
      :type feature: str
      :param feature_type: The machine learning type of the data in the feature.  CATEGORICAL,  CATEGORICAL_LIST,  NUMERICAL,  TIMESTAMP,  TEXT,  EMAIL,  LABEL_LIST,  JSON,  OBJECT_REFERENCE,  MULTICATEGORICAL_LIST,  COORDINATE_LIST,  NUMERICAL_LIST,  TIMESTAMP_LIST Refer to the (guide on feature types)[https://api.abacus.ai/app/help/class/FeatureType] for more information. Note: Some FeatureMappings will restrict the options or explicitly set the FeatureType.
      :type feature_type: str

      :returns: The feature group after the data_type is applied
      :rtype: Schema


   .. py:method:: invalidate_streaming_data(invalid_before_timestamp)

      Invalidates all streaming data with timestamp before invalidBeforeTimestamp

      :param invalid_before_timestamp: The unix timestamp, any data which has a timestamp before this time will be deleted
      :type invalid_before_timestamp: int


   .. py:method:: concatenate_data(source_feature_group_id, merge_type = 'UNION', replace_until_timestamp = None, skip_materialize = False)

      Concatenates data from one feature group to another. Feature groups can be merged if their schema's are compatible and they have the special updateTimestampKey column and if set, the primaryKey column. The second operand in the concatenate operation will be appended to the first operand (merge target).

      :param source_feature_group_id: The feature group to concatenate with the destination feature group.
      :type source_feature_group_id: str
      :param merge_type: UNION or INTERSECTION
      :type merge_type: str
      :param replace_until_timestamp: The unix timestamp to specify the point till which we will replace data from the source feature group.
      :type replace_until_timestamp: int
      :param skip_materialize: If true, will not materialize the concatenated feature group
      :type skip_materialize: bool


   .. py:method:: remove_concatenation_config()

      Removes the concatenation config on a destination feature group.

      :param feature_group_id: Removes the concatenation configuration on a destination feature group
      :type feature_group_id: str


   .. py:method:: refresh()

      Calls describe and refreshes the current object's fields

      :returns: The current object
      :rtype: FeatureGroup


   .. py:method:: describe()

      Describe a Feature Group.

      :param feature_group_id: The unique ID associated with the feature group.
      :type feature_group_id: str

      :returns: The feature group object.
      :rtype: FeatureGroup


   .. py:method:: set_indexing_config(primary_key = None, update_timestamp_key = None, lookup_keys = None)

      Sets various attributes of the feature group used for deployment lookups and streaming updates.

      :param primary_key: Name of feature which defines the primary key of the feature group.
      :type primary_key: str
      :param update_timestamp_key: Name of feature which defines the update timestamp of the feature group - used in concatenation and primary key deduplication.
      :type update_timestamp_key: str
      :param lookup_keys: List of feature names which can be used in the lookup api to restrict the computation to a set of dataset rows. These feature names have to correspond to underlying dataset columns.
      :type lookup_keys: list


   .. py:method:: update(description = None)

      Modifies an existing feature group

      :param description: The description about the feature group.
      :type description: str

      :returns: The updated feature group object.
      :rtype: FeatureGroup


   .. py:method:: detach_from_template()

      Update a feature group to detach it from a template.

      Currently, this converts the feature group into a SQL feature group rather than a template feature group.


      :param feature_group_id: The unique ID associated with the feature group.
      :type feature_group_id: str

      :returns: The updated feature group
      :rtype: FeatureGroup


   .. py:method:: update_template_bindings(template_bindings = None)

      Update the feature group template bindings for a template feature group.

      :param template_bindings: Values in these bindings override values set in the template.
      :type template_bindings: list

      :returns: The updated feature group
      :rtype: FeatureGroup


   .. py:method:: update_python_function_bindings(python_function_bindings)

      Updates an existing Feature Group's python function bindings from a user provided Python Function. If a list of feature groups are supplied within the python function

      bindings, we will provide as arguments to the function DataFrame's (pandas in the case of Python) with the materialized
      feature groups for those input feature groups.


      :param python_function_bindings: List of arguments to be supplied to the function as parameters in the format [{'name': 'function_argument', 'variable_type': 'FEATURE_GROUP', 'value': 'name_of_feature_group'}].
      :type python_function_bindings: list


   .. py:method:: update_sql_definition(sql)

      Updates the SQL statement for a feature group.

      :param sql: Input SQL statement for the feature group.
      :type sql: str

      :returns: The updated feature group
      :rtype: FeatureGroup


   .. py:method:: update_dataset_feature_expression(feature_expression)

      Updates the SQL feature expression for a dataset feature group's custom features

      :param feature_expression: Input SQL statement for the feature group.
      :type feature_expression: str

      :returns: The updated feature group
      :rtype: FeatureGroup


   .. py:method:: update_function_definition(function_source_code = None, function_name = None, input_feature_groups = None, cpu_size = None, memory = None, package_requirements = None, use_original_csv_names = False)

      Updates the function definition for a feature group created using createFeatureGroupFromFunction

      :param function_source_code: Contents of a valid source code file in a supported Feature Group specification language (currently only Python). The source code should contain a function called function_name. A list of allowed import and system libraries for each language is specified in the user functions documentation section.
      :type function_source_code: str
      :param function_name: Name of the function found in the source code that will be executed (on the optional inputs) to materialize this feature group.
      :type function_name: str
      :param input_feature_groups: List of feature groups that are supplied to the function as parameters. Each of the parameters are materialized Dataframes (same type as the functions return value).
      :type input_feature_groups: list
      :param cpu_size: Size of the cpu for the feature group function
      :type cpu_size: str
      :param memory: Memory (in GB) for the feature group function
      :type memory: int
      :param package_requirements: Json with key value pairs corresponding to package: version for each dependency
      :type package_requirements: dict
      :param use_original_csv_names: If set to true, feature group uses the original column names for input feature groups from csv datasets.
      :type use_original_csv_names: bool

      :returns: The updated feature group
      :rtype: FeatureGroup


   .. py:method:: update_zip(function_name, module_name, input_feature_groups = None, cpu_size = None, memory = None, package_requirements = None)

      Updates the zip for a feature group created using createFeatureGroupFromZip

      :param function_name: Name of the function found in the source code that will be executed (on the optional inputs) to materialize this feature group.
      :type function_name: str
      :param module_name: Path to the file with the feature group function.
      :type module_name: str
      :param input_feature_groups: List of feature groups that are supplied to the function as parameters. Each of the parameters are materialized Dataframes (same type as the functions return value).
      :type input_feature_groups: list
      :param cpu_size: Size of the cpu for the feature group function
      :type cpu_size: str
      :param memory: Memory (in GB) for the feature group function
      :type memory: int
      :param package_requirements: Json with key value pairs corresponding to package: version for each dependency
      :type package_requirements: dict

      :returns: The Upload to upload the zip file to
      :rtype: Upload


   .. py:method:: update_git(application_connector_id = None, branch_name = None, python_root = None, function_name = None, module_name = None, input_feature_groups = None, cpu_size = None, memory = None, package_requirements = None)

      Updates a feature group created using createFeatureGroupFromGit

      :param application_connector_id: The unique ID associated with the git application connector.
      :type application_connector_id: str
      :param branch_name: Name of the branch in the git repository to be used for training.
      :type branch_name: str
      :param python_root: Path from the top level of the git repository to the directory containing the Python source code. If not provided, the default is the root of the git repository.
      :type python_root: str
      :param function_name: Name of the function found in the source code that will be executed (on the optional inputs) to materialize this feature group.
      :type function_name: str
      :param module_name: Path to the file with the feature group function.
      :type module_name: str
      :param input_feature_groups: List of feature groups that are supplied to the function as parameters. Each of the parameters are materialized Dataframes (same type as the functions return value).
      :type input_feature_groups: list
      :param cpu_size: Size of the cpu for the feature group function
      :type cpu_size: str
      :param memory: Memory (in GB) for the feature group function
      :type memory: int
      :param package_requirements: Json with key value pairs corresponding to package: version for each dependency
      :type package_requirements: dict

      :returns: The updated FeatureGroup
      :rtype: FeatureGroup


   .. py:method:: update_feature(name, select_expression = None, new_name = None)

      Modifies an existing feature in a feature group. A user needs to specify the name and feature group ID and either a SQL statement or new name to update the feature.

      :param name: The name of the feature to be updated.
      :type name: str
      :param select_expression: Input SQL statement for modifying the feature.
      :type select_expression: str
      :param new_name: The new name of the feature.
      :type new_name: str

      :returns: The updated feature group object.
      :rtype: FeatureGroup


   .. py:method:: list_exports()

      Lists all of the feature group exports for a given feature group

      :param feature_group_id: The ID of the feature group
      :type feature_group_id: str

      :returns: The feature group exports
      :rtype: FeatureGroupExport


   .. py:method:: set_modifier_lock(locked = True)

      To lock a feature group to prevent it from being modified.

      :param locked: True or False to disable or enable feature group modification.
      :type locked: bool


   .. py:method:: list_modifiers()

      To list users who can modify a feature group.

      :param feature_group_id: The unique ID associated with the feature group.
      :type feature_group_id: str

      :returns: Modification lock status and groups and organizations added to the feature group.
      :rtype: ModificationLockInfo


   .. py:method:: add_user_to_modifiers(email)

      Adds user to a feature group.

      :param email: The email address of the user to be removed.
      :type email: str


   .. py:method:: add_organization_group_to_modifiers(organization_group_id)

      Add Organization to a feature group.

      :param organization_group_id: The unique ID associated with the organization group.
      :type organization_group_id: str


   .. py:method:: remove_user_from_modifiers(email)

      Removes user from a feature group.

      :param email: The email address of the user to be removed.
      :type email: str


   .. py:method:: remove_organization_group_from_modifiers(organization_group_id)

      Removes Organization from a feature group.

      :param organization_group_id: The unique ID associated with the organization group.
      :type organization_group_id: str


   .. py:method:: delete_feature(name)

      Removes an existing feature from a feature group. A user needs to specify the name of the feature to be deleted and the feature group ID.

      :param name: The name of the feature to be deleted.
      :type name: str

      :returns: The updated feature group object.
      :rtype: FeatureGroup


   .. py:method:: delete()

      Removes an existing feature group.

      :param feature_group_id: The unique ID associated with the feature group.
      :type feature_group_id: str


   .. py:method:: create_version(variable_bindings = None)

      Creates a snapshot for a specified feature group.

      :param variable_bindings: (JSON Object): JSON object (aka map) defining variable bindings that override parent feature group values.
      :type variable_bindings: dict

      :returns: A feature group version.
      :rtype: FeatureGroupVersion


   .. py:method:: list_versions(limit = 100, start_after_version = None)

      Retrieves a list of all feature group versions for the specified feature group.

      :param limit: The max length of the returned versions
      :type limit: int
      :param start_after_version: Results will start after this version
      :type start_after_version: str

      :returns: An array of feature group version.
      :rtype: FeatureGroupVersion


   .. py:method:: create_template(name, template_sql, template_variables, description = None, template_bindings = None, should_attach_feature_group_to_template = False)

      Create a feature group template.

      :param name: The user-friendly of for this feature group template.
      :type name: str
      :param template_sql: The template sql that will be resolved by applying values from the template variables to generate sql for a feature group.
      :type template_sql: str
      :param template_variables: The template variables for resolving the template.
      :type template_variables: list
      :param description: A description of this feature group template
      :type description: str
      :param template_bindings: If the feature group will be attached to the newly created template, set these variable bindings on that feature group.
      :type template_bindings: list
      :param should_attach_feature_group_to_template: Set to True to convert the feature group to a template feature group and attach it to the newly created template.
      :type should_attach_feature_group_to_template: bool

      :returns: The created feature group template
      :rtype: FeatureGroupTemplate


   .. py:method:: suggest_template_for()

      Suggest values for a feature gruop template, based on a feature group.

      :param feature_group_id: The unique ID associated with the feature group to use for suggesting values to use for the template.
      :type feature_group_id: str

      :returns: None
      :rtype: FeatureGroupTemplate


   .. py:method:: get_recent_streamed_data()

      Returns recently streamed data to a streaming feature group.

      :param feature_group_id: The unique ID associated with the feature group.
      :type feature_group_id: str


   .. py:method:: create_prediction_metric(prediction_metric_config, project_id = None)

      Create a prediction metric job description for the given prediction and actual-labels data.

      :param prediction_metric_config: Specification for prediction metric to run in this job.
      :type prediction_metric_config: dict
      :param project_id: Project to use for the prediction metrics. Defaults to the project for the input feature_group, if the feature_group has exactly one project.
      :type project_id: str

      :returns: The Prediction Metric job description.
      :rtype: PredictionMetric


   .. py:method:: list_prediction_metrics(limit = 100, should_include_latest_version_description = True, start_after_id = None)

      List the prediction metrics for a feature group.

      :param limit: The the number of prediction metrics to be retrieved.
      :type limit: int
      :param should_include_latest_version_description: include the description of the latest prediction metric version for each prediction metric
      :type should_include_latest_version_description: bool
      :param start_after_id: An offset parameter to exclude all prediction metrics till the specified prediction metric ID.
      :type start_after_id: str

      :returns: The prediction metrics for this feature group.
      :rtype: PredictionMetric


   .. py:method:: query_prediction_metrics(project_id = None, limit = 100, should_include_latest_version_description = True, start_after_id = None)

      Query and return prediction metrics and extra data needed by the UI, constrained by the parameters provided.

      feature_group_id (Unique String Identifier): [optional] The feature group used as input to the prediction metrics.
          project_id (Unique String Identifier): [optional] The project_id of the prediction metrics.
          limit (Integer): The the number of prediction metrics to be retrieved.
          should_include_latest_version_description (Boolean): include the description of the latest prediction metric version for each prediction metric
          start_after_id (Unique String Identifier): An offset parameter to exclude all prediction metrics till the specified prediction metric ID.


      :param project_id:
      :type project_id: str
      :param limit:
      :type limit: int
      :param should_include_latest_version_description:
      :type should_include_latest_version_description: bool
      :param start_after_id:
      :type start_after_id: str

      :returns: The prediction metrics for this feature group.
      :rtype: PredictionMetric


   .. py:method:: upsert_data(streaming_token, data)

      Updates new data into the feature group for a given lookup key recordId if the recordID is found otherwise inserts new data into the feature group.

      :param streaming_token: The streaming token for authenticating requests
      :type streaming_token: str
      :param data: The data to record
      :type data: dict


   .. py:method:: append_data(streaming_token, data)

      Appends new data into the feature group for a given lookup key recordId.

      :param streaming_token: The streaming token for authenticating requests
      :type streaming_token: str
      :param data: The data to record
      :type data: dict


   .. py:method:: upsert_multiple_data(streaming_token, data)

      Updates new data into the feature group for a given lookup key recordId if the recordID is found otherwise inserts new data into the feature group.

      :param streaming_token: The streaming token for authenticating requests
      :type streaming_token: str
      :param data: The data to record, as an array of JSON Objects
      :type data: dict


   .. py:method:: append_multiple_data(streaming_token, data)

      Appends new data into the feature group for a given lookup key recordId.

      :param streaming_token: The streaming token for authenticating requests
      :type streaming_token: str
      :param data: The data to record, as an array of JSON objects
      :type data: list


   .. py:method:: wait_for_dataset(timeout = 7200)

          A waiting call until the feature group's dataset, if any, is ready for use.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out. Default value given is 7200 seconds.
      :type timeout: int, optional


   .. py:method:: wait_for_upload(timeout = 7200)

          Waits for a feature group created from a dataframe to be ready for materialization and version creation.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out. Default value given is 7200 seconds.
      :type timeout: int, optional


   .. py:method:: wait_for_materialization(timeout = 7200)

      A waiting call until feature group is materialized.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out. Default value given is 7200 seconds.
      :type timeout: int, optional


   .. py:method:: wait_for_streaming_ready(timeout = 600)

      Waits for the feature group indexing config to be applied for streaming

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out. Default value given is 600 seconds.
      :type timeout: int, optional


   .. py:method:: get_status(streaming_status = False)

      Gets the status of the feature group.

      :returns: A string describing the status of a feature group (pending, complete, etc.).
      :rtype: str


   .. py:method:: load_as_pandas()

      Loads the feature groups into a python pandas dataframe.

      :returns: A pandas dataframe with annotations and text_snippet columns.
      :rtype: DataFrame


   .. py:method:: describe_dataset()

      Displays the dataset attached to a feature group.

      :returns: A dataset object with all the relevant information about the dataset.
      :rtype: Dataset


   .. py:method:: materialize()

      Materializes the feature group's latest change at the api call time. It'll skip materialization if no change since the current latest version.

      :returns: A feature group object with the lastest changes materialized.
      :rtype: FeatureGroup



