An entity type is a type of object in a system that needs to be modeled and have stored information about. For example, driver is an entity type, and driver0 is an instance of an entity type driver.
To get more information about FeaturestoreEntitytype, see:
resource "google_vertex_ai_featurestore" "featurestore" {
name = "terraform"
labels = {
foo = "bar"
}
region = "us-central1"
online_serving_config {
fixed_node_count = 2
}
encryption_spec {
kms_key_name = "kms-name"
}
}
resource "google_vertex_ai_featurestore_entitytype" "entity" {
name = "terraform"
labels = {
foo = "bar"
}
description = "test description"
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval_days = 1
staleness_days = 21
}
numerical_threshold_config {
value = 0.8
}
categorical_threshold_config {
value = 10.0
}
import_features_analysis {
state = "ENABLED"
anomaly_detection_baseline = "PREVIOUS_IMPORT_FEATURES_STATS"
}
}
}
resource "google_vertex_ai_featurestore" "featurestore" {
provider = google-beta
name = "terraform2"
labels = {
foo = "bar"
}
region = "us-central1"
online_serving_config {
fixed_node_count = 2
}
encryption_spec {
kms_key_name = "kms-name"
}
}
resource "google_vertex_ai_featurestore_entitytype" "entity" {
provider = google-beta
name = "terraform2"
labels = {
foo = "bar"
}
featurestore = google_vertex_ai_featurestore.featurestore.id
monitoring_config {
snapshot_analysis {
disabled = false
monitoring_interval = "86400s"
}
categorical_threshold_config {
value = 0.3
}
numerical_threshold_config {
value = 0.3
}
}
offline_storage_ttl_days = 30
}
The following arguments are supported:
featurestore
-
(Required)
The name of the Featurestore to use, in the format projects/{project}/locations/{location}/featurestores/{featurestore}.name
-
(Optional)
The name of the EntityType. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
description
-
(Optional)
Optional. Description of the EntityType.
labels
-
(Optional)
A set of key/value label pairs to assign to this EntityType.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labels
for all of the labels present on the resource.
monitoring_config
-
(Optional)
The default monitoring configuration for all Features under this EntityType.
If this is populated with [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is disabled.
Structure is documented below.
offline_storage_ttl_days
-
(Optional, Beta)
Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than offlineStorageTtlDays since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL.
The monitoring_config
block supports:
snapshot_analysis
-
(Optional)
The config for Snapshot Analysis Based Feature Monitoring.
Structure is documented below.
import_features_analysis
-
(Optional)
The config for ImportFeatures Analysis Based Feature Monitoring.
Structure is documented below.
numerical_threshold_config
-
(Optional)
Threshold for numerical features of anomaly detection. This is shared by all objectives of Featurestore Monitoring for numerical features (i.e. Features with type (Feature.ValueType) DOUBLE or INT64).
Structure is documented below.
categorical_threshold_config
-
(Optional)
Threshold for categorical features of anomaly detection. This is shared by all types of Featurestore Monitoring for categorical features (i.e. Features with type (Feature.ValueType) BOOL or STRING).
Structure is documented below.
The snapshot_analysis
block supports:
disabled
-
(Optional)
The monitoring schedule for snapshot analysis. For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoringInterval for Features under it.
monitoring_interval
-
(Optional, Beta, Deprecated)
Configuration of the snapshot analysis based monitoring pipeline running interval. The value is rolled up to full day.
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
~> Warning: monitoring_interval
is deprecated and will be removed in a future release.
monitoring_interval_days
-
(Optional)
Configuration of the snapshot analysis based monitoring pipeline running interval. The value indicates number of days. The default value is 1.
If both FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] are set when creating/updating EntityTypes/Features, FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days will be used.
staleness_days
-
(Optional)
Customized export features time window for snapshot analysis. Unit is one day. The default value is 21 days. Minimum value is 1 day. Maximum value is 4000 days.
The import_features_analysis
block supports:
state
-
(Optional)
Whether to enable / disable / inherite default hebavior for import features analysis. The value must be one of the values below:
anomaly_detection_baseline
-
(Optional)
Defines the baseline to do anomaly detection for feature values imported by each [entityTypes.importFeatureValues][] operation. The value must be one of the values below:
The numerical_threshold_config
block supports:
value
-
(Required)
Specify a threshold value that can trigger the alert. For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. The default value is 0.3.The categorical_threshold_config
block supports:
value
-
(Required)
Specify a threshold value that can trigger the alert. For categorical feature, the distribution distance is calculated by L-inifinity norm. Each feature must have a non-zero threshold if they need to be monitored. Otherwise no alert will be triggered for that feature. The default value is 0.3.In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{featurestore}}/entityTypes/{{name}}
etag
-
Used to perform consistent read-modify-write updates.
create_time
-
The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
update_time
-
The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
terraform_labels
-
The combination of labels configured directly on the resource
and default labels configured on the provider.
effective_labels
-
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.FeaturestoreEntitytype can be imported using any of these accepted formats:
{{featurestore}}/entityTypes/{{name}}
In Terraform v1.5.0 and later, use an import
block to import FeaturestoreEntitytype using one of the formats above. For example:
import {
id = "{{featurestore}}/entityTypes/{{name}}"
to = google_vertex_ai_featurestore_entitytype.default
}
When using the terraform import
command, FeaturestoreEntitytype can be imported using one of the formats above. For example:
$ terraform import google_vertex_ai_featurestore_entitytype.default {{featurestore}}/entityTypes/{{name}}