Creates a new feature in a Feature Group from a SQL select statement.
Arguments:
REQUIRED
KEY
TYPE
DESCRIPTION
Yes
featureGroupId
str
The unique ID associated with the Feature Group.
Yes
name
str
The name of the feature to add.
Yes
selectExpression
str
SQL SELECT expression to create the feature.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.
Response:
KEY
TYPE
DESCRIPTION
success
Boolean
true if the call succeeded, false if there was an error
result
FeatureGroup
KEY
TYPE
Description
featureGroupId
str
Unique identifier for this feature group.
modificationLock
bool
If feature group is locked against a change or not.
name
String
None
featureGroupSourceType
str
The source type of the feature group
tableName
str
Unique table name of this feature group.
sql
str
SQL definition creating this feature group.
datasetId
str
Dataset ID the feature group is sourced from.
functionSourceCode
str
Source definition creating this feature group.
functionName
str
Function name to execute from the source code.
sourceTables
List[str]
Source tables for this feature group.
createdAt
str
Timestamp at which the feature group was created.
description
str
Description of the feature group.
sqlError
str
Error message with this feature group.
latestVersionOutdated
bool
Is latest materialized feature group version outdated.
referencedFeatureGroups
List[str]
Feature groups this feature group is used in.
tags
List[str]
Tags added to this feature group.
primaryKey
str
Primary index feature.
updateTimestampKey
str
Primary timestamp feature.
lookupKeys
List[str]
Additional indexed features for this feature group.
streamingEnabled
bool
If true, the feature group can have data streamed to it.
incremental
bool
If feature group corresponds to an incremental dataset.
mergeConfig
dict
Merge configuration settings for the feature group.
samplingConfig
dict
Sampling configuration for the feature group.
cpuSize
str
CPU size specified for the Python feature group.
memory
int
Memory in GB specified for the Python feature group.
streamingReady
bool
If true, the feature group is ready to receive streaming data.
featureTags
dict
Tags for features in this feature group
moduleName
str
Path to the file with the feature group function.
templateBindings
dict
Config specifying variable names and values to use when resolving a feature group template.
featureExpression
str
If the dataset feature group has custom features, the SQL select expression creating those features.
useOriginalCsvNames
bool
If true, the feature group will use the original column names in the source dataset.
pythonFunctionBindings
dict
Config specifying variable names, types, and values to use when resolving a Python feature group.
pythonFunctionName
str
Name of the Python function the feature group was built from.
useGpu
bool
Whether this feature group is using gpu
versionLimit
int
Version limit for the feature group.
exportOnMaterialization
bool
Whether to export the feature group on materialization.
features
Feature
List of resolved features.
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureMapping
str
The Feature Mapping of the feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
usingClause
str
Nested Column Using Clause
orderClause
str
Nested Column Ordering Clause
whereClause
str
Nested Column Where Clause
featureType
str
Feature Type of the Feature
dataType
str
Data Type of the Feature
detectedFeatureType
str
The detected feature type of the column
detectedDataType
str
The detected data type of the column
columns
NestedFeature
Nested Features
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureType
str
Feature Type of the Feature
featureMapping
str
The Feature Mapping of the feature
dataType
str
Data Type of the Feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
pointInTimeInfo
PointInTimeFeature
Point in time column information
KEY
TYPE
Description
historyTableName
str
The name of the history table. If not specified, the current table is used for a self-join.
aggregationKeys
List[str]
List of keys to use for joining the historical table and performing the window aggregation.
timestampKey
str
Name of feature which contains the timestamp value for the point-in-time feature.
historicalTimestampKey
str
Name of feature which contains the historical timestamp.
lookbackWindowSeconds
float
If window is specified in terms of time, the number of seconds in the past from the current time for the start of the window.
lookbackWindowLagSeconds
float
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed. If it is negative, we are looking at the "future" rows in the history table.
lookbackCount
int
If window is specified in terms of count, the start position of the window (0 is the current row).
lookbackUntilPosition
int
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
expression
str
SQL aggregate expression which can convert a sequence of rows into a scalar value.
groupName
str
The group name this point-in-time feature belongs to.
duplicateFeatures
Feature
List of duplicate features.
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureMapping
str
The Feature Mapping of the feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
usingClause
str
Nested Column Using Clause
orderClause
str
Nested Column Ordering Clause
whereClause
str
Nested Column Where Clause
featureType
str
Feature Type of the Feature
dataType
str
Data Type of the Feature
detectedFeatureType
str
The detected feature type of the column
detectedDataType
str
The detected data type of the column
columns
NestedFeature
Nested Features
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureType
str
Feature Type of the Feature
featureMapping
str
The Feature Mapping of the feature
dataType
str
Data Type of the Feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
pointInTimeInfo
PointInTimeFeature
Point in time column information
KEY
TYPE
Description
historyTableName
str
The name of the history table. If not specified, the current table is used for a self-join.
aggregationKeys
List[str]
List of keys to use for joining the historical table and performing the window aggregation.
timestampKey
str
Name of feature which contains the timestamp value for the point-in-time feature.
historicalTimestampKey
str
Name of feature which contains the historical timestamp.
lookbackWindowSeconds
float
If window is specified in terms of time, the number of seconds in the past from the current time for the start of the window.
lookbackWindowLagSeconds
float
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed. If it is negative, we are looking at the "future" rows in the history table.
lookbackCount
int
If window is specified in terms of count, the start position of the window (0 is the current row).
lookbackUntilPosition
int
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
expression
str
SQL aggregate expression which can convert a sequence of rows into a scalar value.
groupName
str
The group name this point-in-time feature belongs to.
pointInTimeGroups
PointInTimeGroup
List of Point In Time Groups.
KEY
TYPE
Description
groupName
str
The name of the point in time group
windowKey
str
Name of feature which contains the timestamp value for the point in time feature
aggregationKeys
list
List of keys to use for join the historical table and performing the window aggregation.
lookbackWindow
float
Number of seconds in the past from the current time for start of the window.
lookbackWindowLag
float
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.
lookbackCount
int
If window is specified in terms of count, the start position of the window (0 is the current row)
lookbackUntilPosition
int
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.
historyTableName
str
The table to use for aggregating, if not provided, the source table will be used
historyWindowKey
str
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
historyAggregationKeys
list
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
features
PointInTimeGroupFeature
List of features in the Point in Time group
KEY
TYPE
Description
name
str
The name of the feature
expression
str
SQL Aggregate expression which can convert a sequence of rows into a scalar value.
pitOperationType
str
The operation used in point in time feature generation
pitOperationConfig
dict
The configuration used as input to the operation type
annotationConfig
AnnotationConfig
Annotation config for this feature
KEY
TYPE
Description
featureAnnotationConfigs
list
List of feature annotation configs
labels
list
List of labels
statusFeature
str
Name of the feature that contains the status of the annotation (Optional)
commentsFeatures
list
Features that contain comments for the annotation (Optional)
metadataFeature
str
Name of the feature that contains the metadata for the annotation (Optional)
latestFeatureGroupVersion
FeatureGroupVersion
Latest feature group version.
KEY
TYPE
Description
featureGroupVersion
str
The unique identifier for this materialized version of feature group.
featureGroupId
str
The unique identifier of the feature group this version belongs to.
sql
str
The sql definition creating this feature group.
sourceTables
List[str]
The source tables for this feature group.
sourceDatasetVersions
List[str]
The dataset version ids for this feature group version.
createdAt
str
The timestamp at which the feature group version 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.
useOriginalCsvNames
bool
If true, the feature group will use the original column names in the source dataset.
pythonFunctionBindings
list
Config specifying variable names, types, and values to use when resolving a Python feature group.
indexingConfigWarningMsg
str
The warning message related to indexing keys.
materializationStartedAt
str
The timestamp at which the feature group materialization started.
materializationCompletedAt
str
The timestamp at which the feature group materialization completed.
columns
List[Feature]
List of resolved columns.
templateBindings
list
Template variable bindings used for resolving the template.
features
Feature
List of features.
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureMapping
str
The Feature Mapping of the feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
usingClause
str
Nested Column Using Clause
orderClause
str
Nested Column Ordering Clause
whereClause
str
Nested Column Where Clause
featureType
str
Feature Type of the Feature
dataType
str
Data Type of the Feature
detectedFeatureType
str
The detected feature type of the column
detectedDataType
str
The detected data type of the column
columns
NestedFeature
Nested Features
KEY
TYPE
Description
name
str
The unique name of the column
selectClause
str
The sql logic for creating this feature's data
featureType
str
Feature Type of the Feature
featureMapping
str
The Feature Mapping of the feature
dataType
str
Data Type of the Feature
sourceTable
str
The source table of the column
originalName
str
The original name of the column
pointInTimeInfo
PointInTimeFeature
Point in time column information
KEY
TYPE
Description
historyTableName
str
The name of the history table. If not specified, the current table is used for a self-join.
aggregationKeys
List[str]
List of keys to use for joining the historical table and performing the window aggregation.
timestampKey
str
Name of feature which contains the timestamp value for the point-in-time feature.
historicalTimestampKey
str
Name of feature which contains the historical timestamp.
lookbackWindowSeconds
float
If window is specified in terms of time, the number of seconds in the past from the current time for the start of the window.
lookbackWindowLagSeconds
float
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed. If it is negative, we are looking at the "future" rows in the history table.
lookbackCount
int
If window is specified in terms of count, the start position of the window (0 is the current row).
lookbackUntilPosition
int
Optional lag to offset the closest point for the window. If it is positive, the start of the window is delayed by that many rows. If it is negative, we are looking at those many "future" rows in the history table.
expression
str
SQL aggregate expression which can convert a sequence of rows into a scalar value.
groupName
str
The group name this point-in-time feature belongs to.
pointInTimeGroups
PointInTimeGroup
List of Point In Time Groups
KEY
TYPE
Description
groupName
str
The name of the point in time group
windowKey
str
Name of feature which contains the timestamp value for the point in time feature
aggregationKeys
list
List of keys to use for join the historical table and performing the window aggregation.
lookbackWindow
float
Number of seconds in the past from the current time for start of the window.
lookbackWindowLag
float
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.
lookbackCount
int
If window is specified in terms of count, the start position of the window (0 is the current row)
lookbackUntilPosition
int
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.
historyTableName
str
The table to use for aggregating, if not provided, the source table will be used
historyWindowKey
str
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
historyAggregationKeys
list
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
features
PointInTimeGroupFeature
List of features in the Point in Time group
KEY
TYPE
Description
name
str
The name of the feature
expression
str
SQL Aggregate expression which can convert a sequence of rows into a scalar value.
pitOperationType
str
The operation used in point in time feature generation
pitOperationConfig
dict
The configuration used as input to the operation type
codeSource
CodeSource
If a python feature group, information on the source code
KEY
TYPE
Description
sourceType
str
The type of the source, one of TEXT, PYTHON, FILE_UPLOAD, or APPLICATION_CONNECTOR
sourceCode
str
If the type of the source is TEXT, the raw text of the function
applicationConnectorId
str
The Application Connector to fetch the code from
applicationConnectorInfo
str
Args passed to the application connector to fetch the code
packageRequirements
list
The pip package dependencies required to run the code
status
str
The status of the code and validations
error
str
If the status is failed, an error message describing what went wrong
publishingMsg
dict
Warnings in the source code
moduleDependencies
list
The list of internal modules dependencies required to run the code
annotationConfig
AnnotationConfig
The annotations config for the feature group.
KEY
TYPE
Description
featureAnnotationConfigs
list
List of feature annotation configs
labels
list
List of labels
statusFeature
str
Name of the feature that contains the status of the annotation (Optional)
commentsFeatures
list
Features that contain comments for the annotation (Optional)
metadataFeature
str
Name of the feature that contains the metadata for the annotation (Optional)
indexingConfig
IndexingConfig
The indexing config for the feature group.
KEY
TYPE
Description
primaryKey
str
A single key index
updateTimestampKey
str
The primary timestamp feature
lookupKeys
List[str]
A multi-key index. Cannot be used in conjuction with primary key.
concatenationConfig
ConcatenationConfig
Feature group ID whose data will be concatenated into this feature group.
KEY
TYPE
Description
concatenatedTable
str
The feature group to concatenate with the destination feature group.
mergeType
str
The type of merge to perform, either `UNION` or `INTERSECTION`.
replaceUntilTimestamp
int
The Unix timestamp to specify the point up to which data from the source feature group will be replaced.
skipMaterialize
bool
If `True`, the concatenated feature group will not be materialized.
indexingConfig
IndexingConfig
Indexing config for the feature group for feature store
KEY
TYPE
Description
primaryKey
str
A single key index
updateTimestampKey
str
The primary timestamp feature
lookupKeys
List[str]
A multi-key index. Cannot be used in conjuction with primary key.
codeSource
CodeSource
If a Python feature group, information on the source code.
KEY
TYPE
Description
sourceType
str
The type of the source, one of TEXT, PYTHON, FILE_UPLOAD, or APPLICATION_CONNECTOR
sourceCode
str
If the type of the source is TEXT, the raw text of the function
applicationConnectorId
str
The Application Connector to fetch the code from
applicationConnectorInfo
str
Args passed to the application connector to fetch the code
packageRequirements
list
The pip package dependencies required to run the code
status
str
The status of the code and validations
error
str
If the status is failed, an error message describing what went wrong
publishingMsg
dict
Warnings in the source code
moduleDependencies
list
The list of internal modules dependencies required to run the code
featureGroupTemplate
FeatureGroupTemplate
FeatureGroupTemplate to use when this feature group is attached to a template.
KEY
TYPE
Description
featureGroupTemplateId
str
The unique identifier for this feature group template.
description
str
A user-friendly text description of this feature group template.
featureGroupId
str
The unique identifier for the feature group used to create this template.
isSystemTemplate
bool
True if this is a system template returned from a user organization.
name
str
The user-friendly name of this feature group template.
templateSql
str
SQL that can include variables which will be replaced by values from the template config to resolve this template SQL into a valid SQL query for a feature group.
templateVariables
dict
A map, from template variable names to parameters for replacing those template variables with values (e.g. to values and metadata on how to resolve those values).
createdAt
str
When the feature group template was created.
updatedAt
str
When the feature group template was updated.
explanation
NaturalLanguageExplanation
Natural language explanation of the feature group
KEY
TYPE
Description
shortExplanation
str
succinct explanation of the artifact
longExplanation
str
Longer and verbose explanation of the artifact
isOutdated
bool
Flag indicating whether the explanation is outdated due to a change in the underlying artifact
htmlExplanation
str
HTML formatted explanation of the artifact
refreshSchedules
RefreshSchedule
List of schedules that determines when the next version of the feature group will be created.
KEY
TYPE
Description
refreshPolicyId
str
The unique identifier of the refresh policy
nextRunTime
str
The next run time of the refresh policy. If null, the policy is paused.
cron
str
A cron-style string that describes the when this refresh policy is to be executed in UTC
refreshType
str
The type of refresh that will be run
error
str
An error message for the last pipeline run of a policy
exportConnectorConfig
FeatureGroupRefreshExportConfig
The export config (file connector or database connector information) for feature group exports.
KEY
TYPE
Description
connectorType
str
The type of connector the feature group is
location
str
The file connector location of the feature group export
exportFileFormat
str
The file format of the feature group export
additionalIdColumns
list
Additional id columns to use for upsert operations
databaseFeatureMapping
dict
The mapping of feature names to database columns
externalConnectionId
str
The unique identifier of the external connection to write to
idColumn
str
The column to use as the id column for upsert operations
objectName
str
The name of the object to write to
writeMode
str
The write mode to use for the export
operatorConfig
OperatorConfig
Operator configuration settings for the feature group.