abacusai.feature_group_version
Module Contents
Classes
A materialized version of a feature group |
- class abacusai.feature_group_version.FeatureGroupVersion(client, featureGroupVersion=None, sql=None, sourceTables=None, createdAt=None, status=None, error=None, deployable=None, cpuSize=None, memory=None, features={})
Bases:
abacusai.return_class.AbstractApiClass
A materialized version of a feature group
- Parameters
client (ApiClient) – An authenticated API Client instance
featureGroupVersion (str) – The unique identifier for this version of feature group.
sql (str) – The sql definition creating this feature group.
sourceTables (list of string) – The source tables for this feature group.
createdAt (str) – The timestamp at which the feature group was created.
status (str) – The current status of the feature group version.
error (str) – Relevant error if the status is FAILED.
deployable (bool) – whether feature group is deployable or not.
cpuSize (str) – Cpu size specified for the python feature group.
memory (int) – Memory in GB specified for the python feature group.
features (Feature) – List of features.
- __repr__(self)
Return repr(self).
- to_dict(self)
Get a dict representation of the parameters in this class
- Returns
The dict value representation of the class parameters
- Return type
- export_to_file_connector(self, location, export_file_format, overwrite=False)
Export Feature group to File Connector.
- Parameters
- Returns
The FeatureGroupExport instance
- Return type
- export_to_database_connector(self, database_connector_id, object_name, write_mode, database_feature_mapping, id_column=None)
Export Feature group to Database Connector.
- Parameters
database_connector_id (str) – Database connector to export to.
object_name (str) – The database object to write to
write_mode (str) – Either INSERT or UPSERT
database_feature_mapping (dict) – A key/value pair JSON Object of “database connector column” -> “feature name” pairs.
id_column (str) – Required if mode is UPSERT. Indicates which database column should be used as the lookup key for UPSERT
- Returns
The FeatureGroupExport instance
- Return type
- export_to_console(self, export_file_format)
Export Feature group to console.
- Parameters
export_file_format (str) – File format to export to.
- Returns
The FeatureGroupExport instance
- Return type
- get_materialization_logs(self, stdout=False, stderr=False)
Returns logs for materialized feature group version.
- Parameters
- Returns
A function logs.
- Return type
- refresh(self)
Calls describe and refreshes the current object’s fields
- Returns
The current object
- Return type
- describe(self)
Get a specific feature group version.
- Parameters
feature_group_version (str) – The unique ID associated with the feature group version.
- Returns
A feature group version.
- Return type
- wait_for_results(self, timeout=3600)
A waiting call until feature group version is created.
- Parameters
timeout (int, optional) – 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 3600 milliseconds.
- get_status(self)
Gets the status of the feature group version.
- Returns
A string describing the status of a feature group version (pending, complete, etc.).
- Return type
- _get_avro_file(self, file_part)