Skip to content

googleVertexAiFeaturestoreEntitytype

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:

Example Usage - Vertex Ai Featurestore Entitytype

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleVertexAiFeaturestoreFeaturestore =
  new google.vertexAiFeaturestore.VertexAiFeaturestore(this, "featurestore", {
    encryption_spec: [
      {
        kms_key_name: "kms-name",
      },
    ],
    labels: [
      {
        foo: "bar",
      },
    ],
    name: "terraform",
    online_serving_config: [
      {
        fixed_node_count: 2,
      },
    ],
    region: "us-central1",
  });
new google.vertexAiFeaturestoreEntitytype.VertexAiFeaturestoreEntitytype(
  this,
  "entity",
  {
    description: "test description",
    featurestore: googleVertexAiFeaturestoreFeaturestore.id,
    labels: [
      {
        foo: "bar",
      },
    ],
    monitoring_config: [
      {
        categorical_threshold_config: [
          {
            value: 10,
          },
        ],
        import_features_analysis: [
          {
            anomaly_detection_baseline: "PREVIOUS_IMPORT_FEATURES_STATS",
            state: "ENABLED",
          },
        ],
        numerical_threshold_config: [
          {
            value: 0.8,
          },
        ],
        snapshot_analysis: [
          {
            disabled: false,
            monitoring_interval_days: 1,
            staleness_days: 21,
          },
        ],
      },
    ],
    name: "terraform",
  }
);

Example Usage - Vertex Ai Featurestore Entitytype With Beta Fields

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleVertexAiFeaturestoreFeaturestore =
  new google.vertexAiFeaturestore.VertexAiFeaturestore(this, "featurestore", {
    encryption_spec: [
      {
        kms_key_name: "kms-name",
      },
    ],
    labels: [
      {
        foo: "bar",
      },
    ],
    name: "terraform2",
    online_serving_config: [
      {
        fixed_node_count: 2,
      },
    ],
    provider: "${google-beta}",
    region: "us-central1",
  });
new google.vertexAiFeaturestoreEntitytype.VertexAiFeaturestoreEntitytype(
  this,
  "entity",
  {
    featurestore: googleVertexAiFeaturestoreFeaturestore.id,
    labels: [
      {
        foo: "bar",
      },
    ],
    monitoring_config: [
      {
        categorical_threshold_config: [
          {
            value: 0.3,
          },
        ],
        numerical_threshold_config: [
          {
            value: 0.3,
          },
        ],
        snapshot_analysis: [
          {
            disabled: false,
            monitoring_interval: "86400s",
          },
        ],
      },
    ],
    name: "terraform2",
    offline_storage_ttl_days: 30,
    provider: "${google-beta}",
  }
);

Argument Reference

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.

  • monitoringConfig - (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.

  • offlineStorageTtlDays - (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 monitoringConfig block supports:

  • snapshotAnalysis - (Optional) The config for Snapshot Analysis Based Feature Monitoring. Structure is documented below.

  • importFeaturesAnalysis - (Optional) The config for ImportFeatures Analysis Based Feature Monitoring. Structure is documented below.

  • numericalThresholdConfig - (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.

  • categoricalThresholdConfig - (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 snapshotAnalysis 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.

  • monitoringInterval - (Optional, Beta) 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".

  • monitoringIntervalDays - (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.

  • stalenessDays - (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 importFeaturesAnalysis block supports:

  • state - (Optional) Whether to enable / disable / inherite default hebavior for import features analysis. The value must be one of the values below:

    • DEFAULT: The default behavior of whether to enable the monitoring. EntityType-level config: disabled.
    • ENABLED: Explicitly enables import features analysis. EntityType-level config: by default enables import features analysis for all Features under it.
    • DISABLED: Explicitly disables import features analysis. EntityType-level config: by default disables import features analysis for all Features under it.
  • anomalyDetectionBaseline - (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:

    • LATEST_STATS: Choose the later one statistics generated by either most recent snapshot analysis or previous import features analysis. If non of them exists, skip anomaly detection and only generate a statistics.
    • MOST_RECENT_SNAPSHOT_STATS: Use the statistics generated by the most recent snapshot analysis if exists.
    • PREVIOUS_IMPORT_FEATURES_STATS: Use the statistics generated by the previous import features analysis if exists.

The numericalThresholdConfig 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 categoricalThresholdConfig 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.

Attributes Reference

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.

  • createTime - The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.

  • updateTime - The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

FeaturestoreEntitytype can be imported using any of these accepted formats:

$ terraform import google_vertex_ai_featurestore_entitytype.default {{featurestore}}/entityTypes/{{name}}