1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1beta1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/aiplatform/v1beta1/entity_type.proto"; 24import "google/cloud/aiplatform/v1beta1/feature.proto"; 25import "google/cloud/aiplatform/v1beta1/feature_selector.proto"; 26import "google/cloud/aiplatform/v1beta1/featurestore.proto"; 27import "google/cloud/aiplatform/v1beta1/io.proto"; 28import "google/cloud/aiplatform/v1beta1/operation.proto"; 29import "google/longrunning/operations.proto"; 30import "google/protobuf/empty.proto"; 31import "google/protobuf/field_mask.proto"; 32import "google/protobuf/timestamp.proto"; 33import "google/type/interval.proto"; 34 35option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; 36option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; 37option java_multiple_files = true; 38option java_outer_classname = "FeaturestoreServiceProto"; 39option java_package = "com.google.cloud.aiplatform.v1beta1"; 40option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; 41option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; 42 43// The service that handles CRUD and List for resources for Featurestore. 44service FeaturestoreService { 45 option (google.api.default_host) = "aiplatform.googleapis.com"; 46 option (google.api.oauth_scopes) = 47 "https://www.googleapis.com/auth/cloud-platform"; 48 49 // Creates a new Featurestore in a given project and location. 50 rpc CreateFeaturestore(CreateFeaturestoreRequest) 51 returns (google.longrunning.Operation) { 52 option (google.api.http) = { 53 post: "/v1beta1/{parent=projects/*/locations/*}/featurestores" 54 body: "featurestore" 55 }; 56 option (google.api.method_signature) = "parent,featurestore"; 57 option (google.api.method_signature) = 58 "parent,featurestore,featurestore_id"; 59 option (google.longrunning.operation_info) = { 60 response_type: "Featurestore" 61 metadata_type: "CreateFeaturestoreOperationMetadata" 62 }; 63 } 64 65 // Gets details of a single Featurestore. 66 rpc GetFeaturestore(GetFeaturestoreRequest) returns (Featurestore) { 67 option (google.api.http) = { 68 get: "/v1beta1/{name=projects/*/locations/*/featurestores/*}" 69 }; 70 option (google.api.method_signature) = "name"; 71 } 72 73 // Lists Featurestores in a given project and location. 74 rpc ListFeaturestores(ListFeaturestoresRequest) 75 returns (ListFeaturestoresResponse) { 76 option (google.api.http) = { 77 get: "/v1beta1/{parent=projects/*/locations/*}/featurestores" 78 }; 79 option (google.api.method_signature) = "parent"; 80 } 81 82 // Updates the parameters of a single Featurestore. 83 rpc UpdateFeaturestore(UpdateFeaturestoreRequest) 84 returns (google.longrunning.Operation) { 85 option (google.api.http) = { 86 patch: "/v1beta1/{featurestore.name=projects/*/locations/*/featurestores/*}" 87 body: "featurestore" 88 }; 89 option (google.api.method_signature) = "featurestore,update_mask"; 90 option (google.longrunning.operation_info) = { 91 response_type: "Featurestore" 92 metadata_type: "UpdateFeaturestoreOperationMetadata" 93 }; 94 } 95 96 // Deletes a single Featurestore. The Featurestore must not contain any 97 // EntityTypes or `force` must be set to true for the request to succeed. 98 rpc DeleteFeaturestore(DeleteFeaturestoreRequest) 99 returns (google.longrunning.Operation) { 100 option (google.api.http) = { 101 delete: "/v1beta1/{name=projects/*/locations/*/featurestores/*}" 102 }; 103 option (google.api.method_signature) = "name"; 104 option (google.api.method_signature) = "name,force"; 105 option (google.longrunning.operation_info) = { 106 response_type: "google.protobuf.Empty" 107 metadata_type: "DeleteOperationMetadata" 108 }; 109 } 110 111 // Creates a new EntityType in a given Featurestore. 112 rpc CreateEntityType(CreateEntityTypeRequest) 113 returns (google.longrunning.Operation) { 114 option (google.api.http) = { 115 post: "/v1beta1/{parent=projects/*/locations/*/featurestores/*}/entityTypes" 116 body: "entity_type" 117 }; 118 option (google.api.method_signature) = "parent,entity_type"; 119 option (google.api.method_signature) = "parent,entity_type,entity_type_id"; 120 option (google.longrunning.operation_info) = { 121 response_type: "EntityType" 122 metadata_type: "CreateEntityTypeOperationMetadata" 123 }; 124 } 125 126 // Gets details of a single EntityType. 127 rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { 128 option (google.api.http) = { 129 get: "/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}" 130 }; 131 option (google.api.method_signature) = "name"; 132 } 133 134 // Lists EntityTypes in a given Featurestore. 135 rpc ListEntityTypes(ListEntityTypesRequest) 136 returns (ListEntityTypesResponse) { 137 option (google.api.http) = { 138 get: "/v1beta1/{parent=projects/*/locations/*/featurestores/*}/entityTypes" 139 }; 140 option (google.api.method_signature) = "parent"; 141 } 142 143 // Updates the parameters of a single EntityType. 144 rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { 145 option (google.api.http) = { 146 patch: "/v1beta1/{entity_type.name=projects/*/locations/*/featurestores/*/entityTypes/*}" 147 body: "entity_type" 148 }; 149 option (google.api.method_signature) = "entity_type,update_mask"; 150 } 151 152 // Deletes a single EntityType. The EntityType must not have any Features 153 // or `force` must be set to true for the request to succeed. 154 rpc DeleteEntityType(DeleteEntityTypeRequest) 155 returns (google.longrunning.Operation) { 156 option (google.api.http) = { 157 delete: "/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}" 158 }; 159 option (google.api.method_signature) = "name"; 160 option (google.api.method_signature) = "name,force"; 161 option (google.longrunning.operation_info) = { 162 response_type: "google.protobuf.Empty" 163 metadata_type: "DeleteOperationMetadata" 164 }; 165 } 166 167 // Creates a new Feature in a given EntityType. 168 rpc CreateFeature(CreateFeatureRequest) 169 returns (google.longrunning.Operation) { 170 option (google.api.http) = { 171 post: "/v1beta1/{parent=projects/*/locations/*/featurestores/*/entityTypes/*}/features" 172 body: "feature" 173 }; 174 option (google.api.method_signature) = "parent,feature"; 175 option (google.api.method_signature) = "parent,feature,feature_id"; 176 option (google.longrunning.operation_info) = { 177 response_type: "Feature" 178 metadata_type: "CreateFeatureOperationMetadata" 179 }; 180 } 181 182 // Creates a batch of Features in a given EntityType. 183 rpc BatchCreateFeatures(BatchCreateFeaturesRequest) 184 returns (google.longrunning.Operation) { 185 option (google.api.http) = { 186 post: "/v1beta1/{parent=projects/*/locations/*/featurestores/*/entityTypes/*}/features:batchCreate" 187 body: "*" 188 }; 189 option (google.api.method_signature) = "parent,requests"; 190 option (google.longrunning.operation_info) = { 191 response_type: "BatchCreateFeaturesResponse" 192 metadata_type: "BatchCreateFeaturesOperationMetadata" 193 }; 194 } 195 196 // Gets details of a single Feature. 197 rpc GetFeature(GetFeatureRequest) returns (Feature) { 198 option (google.api.http) = { 199 get: "/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}" 200 }; 201 option (google.api.method_signature) = "name"; 202 } 203 204 // Lists Features in a given EntityType. 205 rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) { 206 option (google.api.http) = { 207 get: "/v1beta1/{parent=projects/*/locations/*/featurestores/*/entityTypes/*}/features" 208 }; 209 option (google.api.method_signature) = "parent"; 210 } 211 212 // Updates the parameters of a single Feature. 213 rpc UpdateFeature(UpdateFeatureRequest) returns (Feature) { 214 option (google.api.http) = { 215 patch: "/v1beta1/{feature.name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}" 216 body: "feature" 217 }; 218 option (google.api.method_signature) = "feature,update_mask"; 219 } 220 221 // Deletes a single Feature. 222 rpc DeleteFeature(DeleteFeatureRequest) 223 returns (google.longrunning.Operation) { 224 option (google.api.http) = { 225 delete: "/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}" 226 }; 227 option (google.api.method_signature) = "name"; 228 option (google.longrunning.operation_info) = { 229 response_type: "google.protobuf.Empty" 230 metadata_type: "DeleteOperationMetadata" 231 }; 232 } 233 234 // Imports Feature values into the Featurestore from a source storage. 235 // 236 // The progress of the import is tracked by the returned operation. The 237 // imported features are guaranteed to be visible to subsequent read 238 // operations after the operation is marked as successfully done. 239 // 240 // If an import operation fails, the Feature values returned from 241 // reads and exports may be inconsistent. If consistency is 242 // required, the caller must retry the same import request again and wait till 243 // the new operation returned is marked as successfully done. 244 // 245 // There are also scenarios where the caller can cause inconsistency. 246 // 247 // - Source data for import contains multiple distinct Feature values for 248 // the same entity ID and timestamp. 249 // - Source is modified during an import. This includes adding, updating, or 250 // removing source data and/or metadata. Examples of updating metadata 251 // include but are not limited to changing storage location, storage class, 252 // or retention policy. 253 // - Online serving cluster is under-provisioned. 254 rpc ImportFeatureValues(ImportFeatureValuesRequest) 255 returns (google.longrunning.Operation) { 256 option (google.api.http) = { 257 post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:importFeatureValues" 258 body: "*" 259 }; 260 option (google.api.method_signature) = "entity_type"; 261 option (google.longrunning.operation_info) = { 262 response_type: "ImportFeatureValuesResponse" 263 metadata_type: "ImportFeatureValuesOperationMetadata" 264 }; 265 } 266 267 // Batch reads Feature values from a Featurestore. 268 // 269 // This API enables batch reading Feature values, where each read 270 // instance in the batch may read Feature values of entities from one or 271 // more EntityTypes. Point-in-time correctness is guaranteed for Feature 272 // values of each read instance as of each instance's read timestamp. 273 rpc BatchReadFeatureValues(BatchReadFeatureValuesRequest) 274 returns (google.longrunning.Operation) { 275 option (google.api.http) = { 276 post: "/v1beta1/{featurestore=projects/*/locations/*/featurestores/*}:batchReadFeatureValues" 277 body: "*" 278 }; 279 option (google.api.method_signature) = "featurestore"; 280 option (google.longrunning.operation_info) = { 281 response_type: "BatchReadFeatureValuesResponse" 282 metadata_type: "BatchReadFeatureValuesOperationMetadata" 283 }; 284 } 285 286 // Exports Feature values from all the entities of a target EntityType. 287 rpc ExportFeatureValues(ExportFeatureValuesRequest) 288 returns (google.longrunning.Operation) { 289 option (google.api.http) = { 290 post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:exportFeatureValues" 291 body: "*" 292 }; 293 option (google.api.method_signature) = "entity_type"; 294 option (google.longrunning.operation_info) = { 295 response_type: "ExportFeatureValuesResponse" 296 metadata_type: "ExportFeatureValuesOperationMetadata" 297 }; 298 } 299 300 // Delete Feature values from Featurestore. 301 // 302 // The progress of the deletion is tracked by the returned operation. The 303 // deleted feature values are guaranteed to be invisible to subsequent read 304 // operations after the operation is marked as successfully done. 305 // 306 // If a delete feature values operation fails, the feature values 307 // returned from reads and exports may be inconsistent. If consistency is 308 // required, the caller must retry the same delete request again and wait till 309 // the new operation returned is marked as successfully done. 310 rpc DeleteFeatureValues(DeleteFeatureValuesRequest) 311 returns (google.longrunning.Operation) { 312 option (google.api.http) = { 313 post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues" 314 body: "*" 315 }; 316 option (google.api.method_signature) = "entity_type"; 317 option (google.longrunning.operation_info) = { 318 response_type: "DeleteFeatureValuesResponse" 319 metadata_type: "DeleteFeatureValuesOperationMetadata" 320 }; 321 } 322 323 // Searches Features matching a query in a given project. 324 rpc SearchFeatures(SearchFeaturesRequest) returns (SearchFeaturesResponse) { 325 option (google.api.http) = { 326 get: "/v1beta1/{location=projects/*/locations/*}/featurestores:searchFeatures" 327 }; 328 option (google.api.method_signature) = "location"; 329 option (google.api.method_signature) = "location,query"; 330 } 331} 332 333// Request message for 334// [FeaturestoreService.CreateFeaturestore][google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeaturestore]. 335message CreateFeaturestoreRequest { 336 // Required. The resource name of the Location to create Featurestores. 337 // Format: 338 // `projects/{project}/locations/{location}` 339 string parent = 1 [ 340 (google.api.field_behavior) = REQUIRED, 341 (google.api.resource_reference) = { 342 child_type: "aiplatform.googleapis.com/Featurestore" 343 } 344 ]; 345 346 // Required. The Featurestore to create. 347 Featurestore featurestore = 2 [(google.api.field_behavior) = REQUIRED]; 348 349 // Required. The ID to use for this Featurestore, which will become the final 350 // component of the Featurestore's resource name. 351 // 352 // This value may be up to 60 characters, and valid characters are 353 // `[a-z0-9_]`. The first character cannot be a number. 354 // 355 // The value must be unique within the project and location. 356 string featurestore_id = 3 [(google.api.field_behavior) = REQUIRED]; 357} 358 359// Request message for 360// [FeaturestoreService.GetFeaturestore][google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeaturestore]. 361message GetFeaturestoreRequest { 362 // Required. The name of the Featurestore resource. 363 string name = 1 [ 364 (google.api.field_behavior) = REQUIRED, 365 (google.api.resource_reference) = { 366 type: "aiplatform.googleapis.com/Featurestore" 367 } 368 ]; 369} 370 371// Request message for 372// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores]. 373message ListFeaturestoresRequest { 374 // Required. The resource name of the Location to list Featurestores. 375 // Format: 376 // `projects/{project}/locations/{location}` 377 string parent = 1 [ 378 (google.api.field_behavior) = REQUIRED, 379 (google.api.resource_reference) = { 380 child_type: "aiplatform.googleapis.com/Featurestore" 381 } 382 ]; 383 384 // Lists the featurestores that match the filter expression. The following 385 // fields are supported: 386 // 387 // * `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. 388 // Values must be 389 // in RFC 3339 format. 390 // * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. 391 // Values must be 392 // in RFC 3339 format. 393 // * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, 394 // `<=`, and `>=` comparisons. 395 // * `labels`: Supports key-value equality and key presence. 396 // 397 // Examples: 398 // 399 // * `create_time > "2020-01-01" OR update_time > "2020-01-01"` 400 // Featurestores created or updated after 2020-01-01. 401 // * `labels.env = "prod"` 402 // Featurestores with label "env" set to "prod". 403 string filter = 2; 404 405 // The maximum number of Featurestores to return. The service may return fewer 406 // than this value. If unspecified, at most 100 Featurestores will be 407 // returned. The maximum value is 100; any value greater than 100 will be 408 // coerced to 100. 409 int32 page_size = 3; 410 411 // A page token, received from a previous 412 // [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores] 413 // call. Provide this to retrieve the subsequent page. 414 // 415 // When paginating, all other parameters provided to 416 // [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores] 417 // must match the call that provided the page token. 418 string page_token = 4; 419 420 // A comma-separated list of fields to order by, sorted in ascending order. 421 // Use "desc" after a field name for descending. 422 // Supported Fields: 423 // 424 // * `create_time` 425 // * `update_time` 426 // * `online_serving_config.fixed_node_count` 427 string order_by = 5; 428 429 // Mask specifying which fields to read. 430 google.protobuf.FieldMask read_mask = 6; 431} 432 433// Response message for 434// [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeaturestores]. 435message ListFeaturestoresResponse { 436 // The Featurestores matching the request. 437 repeated Featurestore featurestores = 1; 438 439 // A token, which can be sent as 440 // [ListFeaturestoresRequest.page_token][google.cloud.aiplatform.v1beta1.ListFeaturestoresRequest.page_token] 441 // to retrieve the next page. If this field is omitted, there are no 442 // subsequent pages. 443 string next_page_token = 2; 444} 445 446// Request message for 447// [FeaturestoreService.UpdateFeaturestore][google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeaturestore]. 448message UpdateFeaturestoreRequest { 449 // Required. The Featurestore's `name` field is used to identify the 450 // Featurestore to be updated. Format: 451 // `projects/{project}/locations/{location}/featurestores/{featurestore}` 452 Featurestore featurestore = 1 [(google.api.field_behavior) = REQUIRED]; 453 454 // Field mask is used to specify the fields to be overwritten in the 455 // Featurestore resource by the update. 456 // The fields specified in the update_mask are relative to the resource, not 457 // the full request. A field will be overwritten if it is in the mask. If the 458 // user does not provide a mask then only the non-empty fields present in the 459 // request will be overwritten. Set the update_mask to `*` to override all 460 // fields. 461 // 462 // Updatable fields: 463 // 464 // * `labels` 465 // * `online_serving_config.fixed_node_count` 466 // * `online_serving_config.scaling` 467 // * `online_storage_ttl_days` 468 google.protobuf.FieldMask update_mask = 2; 469} 470 471// Request message for 472// [FeaturestoreService.DeleteFeaturestore][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeaturestore]. 473message DeleteFeaturestoreRequest { 474 // Required. The name of the Featurestore to be deleted. 475 // Format: 476 // `projects/{project}/locations/{location}/featurestores/{featurestore}` 477 string name = 1 [ 478 (google.api.field_behavior) = REQUIRED, 479 (google.api.resource_reference) = { 480 type: "aiplatform.googleapis.com/Featurestore" 481 } 482 ]; 483 484 // If set to true, any EntityTypes and Features for this Featurestore will 485 // also be deleted. (Otherwise, the request will only work if the Featurestore 486 // has no EntityTypes.) 487 bool force = 2; 488} 489 490// Request message for 491// [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues]. 492message ImportFeatureValuesRequest { 493 // Defines the Feature value(s) to import. 494 message FeatureSpec { 495 // Required. ID of the Feature to import values of. This Feature must exist 496 // in the target EntityType, or the request will fail. 497 string id = 1 [(google.api.field_behavior) = REQUIRED]; 498 499 // Source column to get the Feature values from. If not set, uses the column 500 // with the same name as the Feature ID. 501 string source_field = 2; 502 } 503 504 // Details about the source data, including the location of the storage and 505 // the format. 506 oneof source { 507 AvroSource avro_source = 2; 508 509 BigQuerySource bigquery_source = 3; 510 511 CsvSource csv_source = 4; 512 } 513 514 // Source of Feature timestamp for all Feature values of each entity. 515 // Timestamps must be millisecond-aligned. 516 oneof feature_time_source { 517 // Source column that holds the Feature timestamp for all Feature 518 // values in each entity. 519 string feature_time_field = 6; 520 521 // Single Feature timestamp for all entities being imported. The 522 // timestamp must not have higher than millisecond precision. 523 google.protobuf.Timestamp feature_time = 7; 524 } 525 526 // Required. The resource name of the EntityType grouping the Features for 527 // which values are being imported. Format: 528 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` 529 string entity_type = 1 [ 530 (google.api.field_behavior) = REQUIRED, 531 (google.api.resource_reference) = { 532 type: "aiplatform.googleapis.com/EntityType" 533 } 534 ]; 535 536 // Source column that holds entity IDs. If not provided, entity IDs are 537 // extracted from the column named entity_id. 538 string entity_id_field = 5; 539 540 // Required. Specifications defining which Feature values to import from the 541 // entity. The request fails if no feature_specs are provided, and having 542 // multiple feature_specs for one Feature is not allowed. 543 repeated FeatureSpec feature_specs = 8 544 [(google.api.field_behavior) = REQUIRED]; 545 546 // If set, data will not be imported for online serving. This 547 // is typically used for backfilling, where Feature generation timestamps are 548 // not in the timestamp range needed for online serving. 549 bool disable_online_serving = 9; 550 551 // Specifies the number of workers that are used to write data to the 552 // Featurestore. Consider the online serving capacity that you require to 553 // achieve the desired import throughput without interfering with online 554 // serving. The value must be positive, and less than or equal to 100. 555 // If not set, defaults to using 1 worker. The low count ensures minimal 556 // impact on online serving performance. 557 int32 worker_count = 11; 558 559 // If true, API doesn't start ingestion analysis pipeline. 560 bool disable_ingestion_analysis = 12; 561} 562 563// Response message for 564// [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ImportFeatureValues]. 565message ImportFeatureValuesResponse { 566 // Number of entities that have been imported by the operation. 567 int64 imported_entity_count = 1; 568 569 // Number of Feature values that have been imported by the operation. 570 int64 imported_feature_value_count = 2; 571 572 // The number of rows in input source that weren't imported due to either 573 // * Not having any featureValues. 574 // * Having a null entityId. 575 // * Having a null timestamp. 576 // * Not being parsable (applicable for CSV sources). 577 int64 invalid_row_count = 6; 578 579 // The number rows that weren't ingested due to having feature timestamps 580 // outside the retention boundary. 581 int64 timestamp_outside_retention_rows_count = 4; 582} 583 584// Request message for 585// [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchReadFeatureValues]. 586message BatchReadFeatureValuesRequest { 587 // Describe pass-through fields in read_instance source. 588 message PassThroughField { 589 // Required. The name of the field in the CSV header or the name of the 590 // column in BigQuery table. The naming restriction is the same as 591 // [Feature.name][google.cloud.aiplatform.v1beta1.Feature.name]. 592 string field_name = 1 [(google.api.field_behavior) = REQUIRED]; 593 } 594 595 // Selects Features of an EntityType to read values of and specifies read 596 // settings. 597 message EntityTypeSpec { 598 // Required. ID of the EntityType to select Features. The EntityType id is 599 // the 600 // [entity_type_id][google.cloud.aiplatform.v1beta1.CreateEntityTypeRequest.entity_type_id] 601 // specified during EntityType creation. 602 string entity_type_id = 1 [(google.api.field_behavior) = REQUIRED]; 603 604 // Required. Selectors choosing which Feature values to read from the 605 // EntityType. 606 FeatureSelector feature_selector = 2 607 [(google.api.field_behavior) = REQUIRED]; 608 609 // Per-Feature settings for the batch read. 610 repeated DestinationFeatureSetting settings = 3; 611 } 612 613 oneof read_option { 614 // Each read instance consists of exactly one read timestamp and one or more 615 // entity IDs identifying entities of the corresponding EntityTypes whose 616 // Features are requested. 617 // 618 // Each output instance contains Feature values of requested entities 619 // concatenated together as of the read time. 620 // 621 // An example read instance may be `foo_entity_id, bar_entity_id, 622 // 2020-01-01T10:00:00.123Z`. 623 // 624 // An example output instance may be `foo_entity_id, bar_entity_id, 625 // 2020-01-01T10:00:00.123Z, foo_entity_feature1_value, 626 // bar_entity_feature2_value`. 627 // 628 // Timestamp in each read instance must be millisecond-aligned. 629 // 630 // `csv_read_instances` are read instances stored in a plain-text CSV file. 631 // The header should be: 632 // [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp 633 // 634 // The columns can be in any order. 635 // 636 // Values in the timestamp column must use the RFC 3339 format, e.g. 637 // `2012-07-30T10:43:17.123Z`. 638 CsvSource csv_read_instances = 3; 639 640 // Similar to csv_read_instances, but from BigQuery source. 641 BigQuerySource bigquery_read_instances = 5; 642 } 643 644 // Required. The resource name of the Featurestore from which to query Feature 645 // values. Format: 646 // `projects/{project}/locations/{location}/featurestores/{featurestore}` 647 string featurestore = 1 [ 648 (google.api.field_behavior) = REQUIRED, 649 (google.api.resource_reference) = { 650 type: "aiplatform.googleapis.com/Featurestore" 651 } 652 ]; 653 654 // Required. Specifies output location and format. 655 FeatureValueDestination destination = 4 656 [(google.api.field_behavior) = REQUIRED]; 657 658 // When not empty, the specified fields in the *_read_instances source will be 659 // joined as-is in the output, in addition to those fields from the 660 // Featurestore Entity. 661 // 662 // For BigQuery source, the type of the pass-through values will be 663 // automatically inferred. For CSV source, the pass-through values will be 664 // passed as opaque bytes. 665 repeated PassThroughField pass_through_fields = 8; 666 667 // Required. Specifies EntityType grouping Features to read values of and 668 // settings. 669 repeated EntityTypeSpec entity_type_specs = 7 670 [(google.api.field_behavior) = REQUIRED]; 671 672 // Optional. Excludes Feature values with feature generation timestamp before 673 // this timestamp. If not set, retrieve oldest values kept in Feature Store. 674 // Timestamp, if present, must not have higher than millisecond precision. 675 google.protobuf.Timestamp start_time = 11 676 [(google.api.field_behavior) = OPTIONAL]; 677} 678 679// Request message for 680// [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ExportFeatureValues]. 681message ExportFeatureValuesRequest { 682 // Describes exporting the latest Feature values of all entities of the 683 // EntityType between [start_time, snapshot_time]. 684 message SnapshotExport { 685 // Exports Feature values as of this timestamp. If not set, 686 // retrieve values as of now. Timestamp, if present, must not have higher 687 // than millisecond precision. 688 google.protobuf.Timestamp snapshot_time = 1; 689 690 // Excludes Feature values with feature generation timestamp before this 691 // timestamp. If not set, retrieve oldest values kept in Feature Store. 692 // Timestamp, if present, must not have higher than millisecond precision. 693 google.protobuf.Timestamp start_time = 2; 694 } 695 696 // Describes exporting all historical Feature values of all entities of the 697 // EntityType between [start_time, end_time]. 698 message FullExport { 699 // Excludes Feature values with feature generation timestamp before this 700 // timestamp. If not set, retrieve oldest values kept in Feature Store. 701 // Timestamp, if present, must not have higher than millisecond precision. 702 google.protobuf.Timestamp start_time = 2; 703 704 // Exports Feature values as of this timestamp. If not set, 705 // retrieve values as of now. Timestamp, if present, must not have higher 706 // than millisecond precision. 707 google.protobuf.Timestamp end_time = 1; 708 } 709 710 // Required. The mode in which Feature values are exported. 711 oneof mode { 712 // Exports the latest Feature values of all entities of the EntityType 713 // within a time range. 714 SnapshotExport snapshot_export = 3; 715 716 // Exports all historical values of all entities of the EntityType within a 717 // time range 718 FullExport full_export = 7; 719 } 720 721 // Required. The resource name of the EntityType from which to export Feature 722 // values. Format: 723 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 724 string entity_type = 1 [ 725 (google.api.field_behavior) = REQUIRED, 726 (google.api.resource_reference) = { 727 type: "aiplatform.googleapis.com/EntityType" 728 } 729 ]; 730 731 // Required. Specifies destination location and format. 732 FeatureValueDestination destination = 4 733 [(google.api.field_behavior) = REQUIRED]; 734 735 // Required. Selects Features to export values of. 736 FeatureSelector feature_selector = 5 [(google.api.field_behavior) = REQUIRED]; 737 738 // Per-Feature export settings. 739 repeated DestinationFeatureSetting settings = 6; 740} 741 742message DestinationFeatureSetting { 743 // Required. The ID of the Feature to apply the setting to. 744 string feature_id = 1 [(google.api.field_behavior) = REQUIRED]; 745 746 // Specify the field name in the export destination. If not specified, 747 // Feature ID is used. 748 string destination_field = 2; 749} 750 751// A destination location for Feature values and format. 752message FeatureValueDestination { 753 oneof destination { 754 // Output in BigQuery format. 755 // [BigQueryDestination.output_uri][google.cloud.aiplatform.v1beta1.BigQueryDestination.output_uri] 756 // in 757 // [FeatureValueDestination.bigquery_destination][google.cloud.aiplatform.v1beta1.FeatureValueDestination.bigquery_destination] 758 // must refer to a table. 759 BigQueryDestination bigquery_destination = 1; 760 761 // Output in TFRecord format. 762 // 763 // Below are the mapping from Feature value type 764 // in Featurestore to Feature value type in TFRecord: 765 // 766 // Value type in Featurestore | Value type in TFRecord 767 // DOUBLE, DOUBLE_ARRAY | FLOAT_LIST 768 // INT64, INT64_ARRAY | INT64_LIST 769 // STRING, STRING_ARRAY, BYTES | BYTES_LIST 770 // true -> byte_string("true"), false -> byte_string("false") 771 // BOOL, BOOL_ARRAY (true, false) | BYTES_LIST 772 TFRecordDestination tfrecord_destination = 2; 773 774 // Output in CSV format. Array Feature value types are not allowed in CSV 775 // format. 776 CsvDestination csv_destination = 3; 777 } 778} 779 780// Response message for 781// [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.ExportFeatureValues]. 782message ExportFeatureValuesResponse {} 783 784// Response message for 785// [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchReadFeatureValues]. 786message BatchReadFeatureValuesResponse {} 787 788// Request message for 789// [FeaturestoreService.CreateEntityType][google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateEntityType]. 790message CreateEntityTypeRequest { 791 // Required. The resource name of the Featurestore to create EntityTypes. 792 // Format: 793 // `projects/{project}/locations/{location}/featurestores/{featurestore}` 794 string parent = 1 [ 795 (google.api.field_behavior) = REQUIRED, 796 (google.api.resource_reference) = { 797 type: "aiplatform.googleapis.com/Featurestore" 798 } 799 ]; 800 801 // The EntityType to create. 802 EntityType entity_type = 2; 803 804 // Required. The ID to use for the EntityType, which will become the final 805 // component of the EntityType's resource name. 806 // 807 // This value may be up to 60 characters, and valid characters are 808 // `[a-z0-9_]`. The first character cannot be a number. 809 // 810 // The value must be unique within a featurestore. 811 string entity_type_id = 3 [(google.api.field_behavior) = REQUIRED]; 812} 813 814// Request message for 815// [FeaturestoreService.GetEntityType][google.cloud.aiplatform.v1beta1.FeaturestoreService.GetEntityType]. 816message GetEntityTypeRequest { 817 // Required. The name of the EntityType resource. 818 // Format: 819 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 820 string name = 1 [ 821 (google.api.field_behavior) = REQUIRED, 822 (google.api.resource_reference) = { 823 type: "aiplatform.googleapis.com/EntityType" 824 } 825 ]; 826} 827 828// Request message for 829// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes]. 830message ListEntityTypesRequest { 831 // Required. The resource name of the Featurestore to list EntityTypes. 832 // Format: 833 // `projects/{project}/locations/{location}/featurestores/{featurestore}` 834 string parent = 1 [ 835 (google.api.field_behavior) = REQUIRED, 836 (google.api.resource_reference) = { 837 child_type: "aiplatform.googleapis.com/EntityType" 838 } 839 ]; 840 841 // Lists the EntityTypes that match the filter expression. The following 842 // filters are supported: 843 // 844 // * `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. 845 // Values must be in RFC 3339 format. 846 // * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. 847 // Values must be in RFC 3339 format. 848 // * `labels`: Supports key-value equality as well as key presence. 849 // 850 // Examples: 851 // 852 // * `create_time > \"2020-01-31T15:30:00.000000Z\" OR 853 // update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created 854 // or updated after 2020-01-31T15:30:00.000000Z. 855 // * `labels.active = yes AND labels.env = prod` --> EntityTypes having both 856 // (active: yes) and (env: prod) labels. 857 // * `labels.env: *` --> Any EntityType which has a label with 'env' as the 858 // key. 859 string filter = 2; 860 861 // The maximum number of EntityTypes to return. The service may return fewer 862 // than this value. If unspecified, at most 1000 EntityTypes will be returned. 863 // The maximum value is 1000; any value greater than 1000 will be coerced to 864 // 1000. 865 int32 page_size = 3; 866 867 // A page token, received from a previous 868 // [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes] 869 // call. Provide this to retrieve the subsequent page. 870 // 871 // When paginating, all other parameters provided to 872 // [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes] 873 // must match the call that provided the page token. 874 string page_token = 4; 875 876 // A comma-separated list of fields to order by, sorted in ascending order. 877 // Use "desc" after a field name for descending. 878 // 879 // Supported fields: 880 // 881 // * `entity_type_id` 882 // * `create_time` 883 // * `update_time` 884 string order_by = 5; 885 886 // Mask specifying which fields to read. 887 google.protobuf.FieldMask read_mask = 6; 888} 889 890// Response message for 891// [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListEntityTypes]. 892message ListEntityTypesResponse { 893 // The EntityTypes matching the request. 894 repeated EntityType entity_types = 1; 895 896 // A token, which can be sent as 897 // [ListEntityTypesRequest.page_token][google.cloud.aiplatform.v1beta1.ListEntityTypesRequest.page_token] 898 // to retrieve the next page. If this field is omitted, there are no 899 // subsequent pages. 900 string next_page_token = 2; 901} 902 903// Request message for 904// [FeaturestoreService.UpdateEntityType][google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateEntityType]. 905message UpdateEntityTypeRequest { 906 // Required. The EntityType's `name` field is used to identify the EntityType 907 // to be updated. Format: 908 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 909 EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; 910 911 // Field mask is used to specify the fields to be overwritten in the 912 // EntityType resource by the update. 913 // The fields specified in the update_mask are relative to the resource, not 914 // the full request. A field will be overwritten if it is in the mask. If the 915 // user does not provide a mask then only the non-empty fields present in the 916 // request will be overwritten. Set the update_mask to `*` to override all 917 // fields. 918 // 919 // Updatable fields: 920 // 921 // * `description` 922 // * `labels` 923 // * `monitoring_config.snapshot_analysis.disabled` 924 // * `monitoring_config.snapshot_analysis.monitoring_interval_days` 925 // * `monitoring_config.snapshot_analysis.staleness_days` 926 // * `monitoring_config.import_features_analysis.state` 927 // * `monitoring_config.import_features_analysis.anomaly_detection_baseline` 928 // * `monitoring_config.numerical_threshold_config.value` 929 // * `monitoring_config.categorical_threshold_config.value` 930 // * `offline_storage_ttl_days` 931 google.protobuf.FieldMask update_mask = 2; 932} 933 934// Request message for [FeaturestoreService.DeleteEntityTypes][]. 935message DeleteEntityTypeRequest { 936 // Required. The name of the EntityType to be deleted. 937 // Format: 938 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 939 string name = 1 [ 940 (google.api.field_behavior) = REQUIRED, 941 (google.api.resource_reference) = { 942 type: "aiplatform.googleapis.com/EntityType" 943 } 944 ]; 945 946 // If set to true, any Features for this EntityType will also be deleted. 947 // (Otherwise, the request will only work if the EntityType has no Features.) 948 bool force = 2; 949} 950 951// Request message for 952// [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1beta1.FeaturestoreService.CreateFeature]. 953// Request message for 954// [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.CreateFeature]. 955message CreateFeatureRequest { 956 // Required. The resource name of the EntityType or FeatureGroup to create a 957 // Feature. Format for entity_type as parent: 958 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 959 // Format for feature_group as parent: 960 // `projects/{project}/locations/{location}/featureGroups/{feature_group}` 961 string parent = 1 [ 962 (google.api.field_behavior) = REQUIRED, 963 (google.api.resource_reference) = { 964 child_type: "aiplatform.googleapis.com/Feature" 965 } 966 ]; 967 968 // Required. The Feature to create. 969 Feature feature = 2 [(google.api.field_behavior) = REQUIRED]; 970 971 // Required. The ID to use for the Feature, which will become the final 972 // component of the Feature's resource name. 973 // 974 // This value may be up to 128 characters, and valid characters are 975 // `[a-z0-9_]`. The first character cannot be a number. 976 // 977 // The value must be unique within an EntityType/FeatureGroup. 978 string feature_id = 3 [(google.api.field_behavior) = REQUIRED]; 979} 980 981// Request message for 982// [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchCreateFeatures]. 983message BatchCreateFeaturesRequest { 984 // Required. The resource name of the EntityType to create the batch of 985 // Features under. Format: 986 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 987 string parent = 1 [ 988 (google.api.field_behavior) = REQUIRED, 989 (google.api.resource_reference) = { 990 type: "aiplatform.googleapis.com/EntityType" 991 } 992 ]; 993 994 // Required. The request message specifying the Features to create. All 995 // Features must be created under the same parent EntityType. The `parent` 996 // field in each child request message can be omitted. If `parent` is set in a 997 // child request, then the value must match the `parent` value in this request 998 // message. 999 repeated CreateFeatureRequest requests = 2 1000 [(google.api.field_behavior) = REQUIRED]; 1001} 1002 1003// Response message for 1004// [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.BatchCreateFeatures]. 1005message BatchCreateFeaturesResponse { 1006 // The Features created. 1007 repeated Feature features = 1; 1008} 1009 1010// Request message for 1011// [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1beta1.FeaturestoreService.GetFeature]. 1012// Request message for 1013// [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.GetFeature]. 1014message GetFeatureRequest { 1015 // Required. The name of the Feature resource. 1016 // Format for entity_type as parent: 1017 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 1018 // Format for feature_group as parent: 1019 // `projects/{project}/locations/{location}/featureGroups/{feature_group}` 1020 string name = 1 [ 1021 (google.api.field_behavior) = REQUIRED, 1022 (google.api.resource_reference) = { 1023 type: "aiplatform.googleapis.com/Feature" 1024 } 1025 ]; 1026} 1027 1028// Request message for 1029// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]. 1030// Request message for 1031// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]. 1032message ListFeaturesRequest { 1033 // Required. The resource name of the Location to list Features. 1034 // Format for entity_type as parent: 1035 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` 1036 // Format for feature_group as parent: 1037 // `projects/{project}/locations/{location}/featureGroups/{feature_group}` 1038 string parent = 1 [ 1039 (google.api.field_behavior) = REQUIRED, 1040 (google.api.resource_reference) = { 1041 child_type: "aiplatform.googleapis.com/Feature" 1042 } 1043 ]; 1044 1045 // Lists the Features that match the filter expression. The following 1046 // filters are supported: 1047 // 1048 // * `value_type`: Supports = and != comparisons. 1049 // * `create_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must 1050 // be in RFC 3339 format. 1051 // * `update_time`: Supports =, !=, <, >, >=, and <= comparisons. Values must 1052 // be in RFC 3339 format. 1053 // * `labels`: Supports key-value equality as well as key presence. 1054 // 1055 // Examples: 1056 // 1057 // * `value_type = DOUBLE` --> Features whose type is DOUBLE. 1058 // * `create_time > \"2020-01-31T15:30:00.000000Z\" OR 1059 // update_time > \"2020-01-31T15:30:00.000000Z\"` --> EntityTypes created 1060 // or updated after 2020-01-31T15:30:00.000000Z. 1061 // * `labels.active = yes AND labels.env = prod` --> Features having both 1062 // (active: yes) and (env: prod) labels. 1063 // * `labels.env: *` --> Any Feature which has a label with 'env' as the 1064 // key. 1065 string filter = 2; 1066 1067 // The maximum number of Features to return. The service may return fewer 1068 // than this value. If unspecified, at most 1000 Features will be returned. 1069 // The maximum value is 1000; any value greater than 1000 will be coerced to 1070 // 1000. 1071 int32 page_size = 3; 1072 1073 // A page token, received from a previous 1074 // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures] 1075 // call or 1076 // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures] 1077 // call. Provide this to retrieve the subsequent page. 1078 // 1079 // When paginating, all other parameters provided to 1080 // [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures] 1081 // or 1082 // [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures] 1083 // must match the call that provided the page token. 1084 string page_token = 4; 1085 1086 // A comma-separated list of fields to order by, sorted in ascending order. 1087 // Use "desc" after a field name for descending. 1088 // Supported fields: 1089 // 1090 // * `feature_id` 1091 // * `value_type` (Not supported for FeatureRegistry Feature) 1092 // * `create_time` 1093 // * `update_time` 1094 string order_by = 5; 1095 1096 // Mask specifying which fields to read. 1097 google.protobuf.FieldMask read_mask = 6; 1098 1099 // Only applicable for Vertex AI Feature Store (Legacy). 1100 // If set, return the most recent 1101 // [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count] 1102 // of stats for each Feature in response. Valid value is [0, 10]. If number of 1103 // stats exists < 1104 // [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.latest_stats_count], 1105 // return all existing stats. 1106 int32 latest_stats_count = 7; 1107} 1108 1109// Response message for 1110// [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.ListFeatures]. 1111// Response message for 1112// [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1beta1.FeatureRegistryService.ListFeatures]. 1113message ListFeaturesResponse { 1114 // The Features matching the request. 1115 repeated Feature features = 1; 1116 1117 // A token, which can be sent as 1118 // [ListFeaturesRequest.page_token][google.cloud.aiplatform.v1beta1.ListFeaturesRequest.page_token] 1119 // to retrieve the next page. If this field is omitted, there are no 1120 // subsequent pages. 1121 string next_page_token = 2; 1122} 1123 1124// Request message for 1125// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures]. 1126message SearchFeaturesRequest { 1127 // Required. The resource name of the Location to search Features. 1128 // Format: 1129 // `projects/{project}/locations/{location}` 1130 string location = 1 [ 1131 (google.api.field_behavior) = REQUIRED, 1132 (google.api.resource_reference) = { 1133 type: "locations.googleapis.com/Location" 1134 } 1135 ]; 1136 1137 // Query string that is a conjunction of field-restricted queries and/or 1138 // field-restricted filters. Field-restricted queries and filters can be 1139 // combined using `AND` to form a conjunction. 1140 // 1141 // A field query is in the form FIELD:QUERY. This implicitly checks if QUERY 1142 // exists as a substring within Feature's FIELD. The QUERY 1143 // and the FIELD are converted to a sequence of words (i.e. tokens) for 1144 // comparison. This is done by: 1145 // 1146 // * Removing leading/trailing whitespace and tokenizing the search value. 1147 // Characters that are not one of alphanumeric `[a-zA-Z0-9]`, underscore 1148 // `_`, or asterisk `*` are treated as delimiters for tokens. `*` is treated 1149 // as a wildcard that matches characters within a token. 1150 // * Ignoring case. 1151 // * Prepending an asterisk to the first and appending an asterisk to the 1152 // last token in QUERY. 1153 // 1154 // A QUERY must be either a singular token or a phrase. A phrase is one or 1155 // multiple words enclosed in double quotation marks ("). With phrases, the 1156 // order of the words is important. Words in the phrase must be matching in 1157 // order and consecutively. 1158 // 1159 // Supported FIELDs for field-restricted queries: 1160 // 1161 // * `feature_id` 1162 // * `description` 1163 // * `entity_type_id` 1164 // 1165 // Examples: 1166 // 1167 // * `feature_id: foo` --> Matches a Feature with ID containing the substring 1168 // `foo` (eg. `foo`, `foofeature`, `barfoo`). 1169 // * `feature_id: foo*feature` --> Matches a Feature with ID containing the 1170 // substring `foo*feature` (eg. `foobarfeature`). 1171 // * `feature_id: foo AND description: bar` --> Matches a Feature with ID 1172 // containing the substring `foo` and description containing the substring 1173 // `bar`. 1174 // 1175 // 1176 // Besides field queries, the following exact-match filters are 1177 // supported. The exact-match filters do not support wildcards. Unlike 1178 // field-restricted queries, exact-match filters are case-sensitive. 1179 // 1180 // * `feature_id`: Supports = comparisons. 1181 // * `description`: Supports = comparisons. Multi-token filters should be 1182 // enclosed in quotes. 1183 // * `entity_type_id`: Supports = comparisons. 1184 // * `value_type`: Supports = and != comparisons. 1185 // * `labels`: Supports key-value equality as well as key presence. 1186 // * `featurestore_id`: Supports = comparisons. 1187 // 1188 // Examples: 1189 // 1190 // * `description = "foo bar"` --> Any Feature with description exactly equal 1191 // to `foo bar` 1192 // * `value_type = DOUBLE` --> Features whose type is DOUBLE. 1193 // * `labels.active = yes AND labels.env = prod` --> Features having both 1194 // (active: yes) and (env: prod) labels. 1195 // * `labels.env: *` --> Any Feature which has a label with `env` as the 1196 // key. 1197 string query = 3; 1198 1199 // The maximum number of Features to return. The service may return fewer 1200 // than this value. If unspecified, at most 100 Features will be returned. 1201 // The maximum value is 100; any value greater than 100 will be coerced to 1202 // 100. 1203 int32 page_size = 4; 1204 1205 // A page token, received from a previous 1206 // [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures] 1207 // call. Provide this to retrieve the subsequent page. 1208 // 1209 // When paginating, all other parameters provided to 1210 // [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures], 1211 // except `page_size`, must match the call that provided the page token. 1212 string page_token = 5; 1213} 1214 1215// Response message for 1216// [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1beta1.FeaturestoreService.SearchFeatures]. 1217message SearchFeaturesResponse { 1218 // The Features matching the request. 1219 // 1220 // Fields returned: 1221 // 1222 // * `name` 1223 // * `description` 1224 // * `labels` 1225 // * `create_time` 1226 // * `update_time` 1227 repeated Feature features = 1; 1228 1229 // A token, which can be sent as 1230 // [SearchFeaturesRequest.page_token][google.cloud.aiplatform.v1beta1.SearchFeaturesRequest.page_token] 1231 // to retrieve the next page. If this field is omitted, there are no 1232 // subsequent pages. 1233 string next_page_token = 2; 1234} 1235 1236// Request message for 1237// [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1beta1.FeaturestoreService.UpdateFeature]. 1238// Request message for 1239// [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.UpdateFeature]. 1240message UpdateFeatureRequest { 1241 // Required. The Feature's `name` field is used to identify the Feature to be 1242 // updated. 1243 // Format: 1244 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` 1245 // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` 1246 Feature feature = 1 [(google.api.field_behavior) = REQUIRED]; 1247 1248 // Field mask is used to specify the fields to be overwritten in the 1249 // Features resource by the update. 1250 // The fields specified in the update_mask are relative to the resource, not 1251 // the full request. A field will be overwritten if it is in the mask. If the 1252 // user does not provide a mask then only the non-empty fields present in the 1253 // request will be overwritten. Set the update_mask to `*` to override all 1254 // fields. 1255 // 1256 // Updatable fields: 1257 // 1258 // * `description` 1259 // * `labels` 1260 // * `disable_monitoring` (Not supported for FeatureRegistry Feature) 1261 google.protobuf.FieldMask update_mask = 2; 1262} 1263 1264// Request message for 1265// [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeature]. 1266// Request message for 1267// [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1beta1.FeatureRegistryService.DeleteFeature]. 1268message DeleteFeatureRequest { 1269 // Required. The name of the Features to be deleted. 1270 // Format: 1271 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}` 1272 // `projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}` 1273 string name = 1 [ 1274 (google.api.field_behavior) = REQUIRED, 1275 (google.api.resource_reference) = { 1276 type: "aiplatform.googleapis.com/Feature" 1277 } 1278 ]; 1279} 1280 1281// Details of operations that perform create Featurestore. 1282message CreateFeaturestoreOperationMetadata { 1283 // Operation metadata for Featurestore. 1284 GenericOperationMetadata generic_metadata = 1; 1285} 1286 1287// Details of operations that perform update Featurestore. 1288message UpdateFeaturestoreOperationMetadata { 1289 // Operation metadata for Featurestore. 1290 GenericOperationMetadata generic_metadata = 1; 1291} 1292 1293// Details of operations that perform import Feature values. 1294message ImportFeatureValuesOperationMetadata { 1295 // Operation metadata for Featurestore import Feature values. 1296 GenericOperationMetadata generic_metadata = 1; 1297 1298 // Number of entities that have been imported by the operation. 1299 int64 imported_entity_count = 2; 1300 1301 // Number of Feature values that have been imported by the operation. 1302 int64 imported_feature_value_count = 3; 1303 1304 // The source URI from where Feature values are imported. 1305 repeated string source_uris = 4; 1306 1307 // The number of rows in input source that weren't imported due to either 1308 // * Not having any featureValues. 1309 // * Having a null entityId. 1310 // * Having a null timestamp. 1311 // * Not being parsable (applicable for CSV sources). 1312 int64 invalid_row_count = 6; 1313 1314 // The number rows that weren't ingested due to having timestamps outside the 1315 // retention boundary. 1316 int64 timestamp_outside_retention_rows_count = 7; 1317 1318 // List of ImportFeatureValues operations running under a single EntityType 1319 // that are blocking this operation. 1320 repeated int64 blocking_operation_ids = 8; 1321} 1322 1323// Details of operations that exports Features values. 1324message ExportFeatureValuesOperationMetadata { 1325 // Operation metadata for Featurestore export Feature values. 1326 GenericOperationMetadata generic_metadata = 1; 1327} 1328 1329// Details of operations that batch reads Feature values. 1330message BatchReadFeatureValuesOperationMetadata { 1331 // Operation metadata for Featurestore batch read Features values. 1332 GenericOperationMetadata generic_metadata = 1; 1333} 1334 1335// Details of operations that delete Feature values. 1336message DeleteFeatureValuesOperationMetadata { 1337 // Operation metadata for Featurestore delete Features values. 1338 GenericOperationMetadata generic_metadata = 1; 1339} 1340 1341// Details of operations that perform create EntityType. 1342message CreateEntityTypeOperationMetadata { 1343 // Operation metadata for EntityType. 1344 GenericOperationMetadata generic_metadata = 1; 1345} 1346 1347// Details of operations that perform create Feature. 1348message CreateFeatureOperationMetadata { 1349 // Operation metadata for Feature. 1350 GenericOperationMetadata generic_metadata = 1; 1351} 1352 1353// Details of operations that perform batch create Features. 1354message BatchCreateFeaturesOperationMetadata { 1355 // Operation metadata for Feature. 1356 GenericOperationMetadata generic_metadata = 1; 1357} 1358 1359// Request message for 1360// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues]. 1361message DeleteFeatureValuesRequest { 1362 // Message to select entity. 1363 // If an entity id is selected, all the feature values corresponding to the 1364 // entity id will be deleted, including the entityId. 1365 message SelectEntity { 1366 // Required. Selectors choosing feature values of which entity id to be 1367 // deleted from the EntityType. 1368 EntityIdSelector entity_id_selector = 1 1369 [(google.api.field_behavior) = REQUIRED]; 1370 } 1371 1372 // Message to select time range and feature. 1373 // Values of the selected feature generated within an inclusive time range 1374 // will be deleted. Using this option permanently deletes the feature values 1375 // from the specified feature IDs within the specified time range. 1376 // This might include data from the online storage. If you want to retain 1377 // any deleted historical data in the online storage, you must re-ingest it. 1378 message SelectTimeRangeAndFeature { 1379 // Required. Select feature generated within a half-inclusive time range. 1380 // The time range is lower inclusive and upper exclusive. 1381 google.type.Interval time_range = 1 1382 [(google.api.field_behavior) = REQUIRED]; 1383 1384 // Required. Selectors choosing which feature values to be deleted from the 1385 // EntityType. 1386 FeatureSelector feature_selector = 2 1387 [(google.api.field_behavior) = REQUIRED]; 1388 1389 // If set, data will not be deleted from online storage. 1390 // When time range is older than the data in online storage, setting this to 1391 // be true will make the deletion have no impact on online serving. 1392 bool skip_online_storage_delete = 3; 1393 } 1394 1395 // Defines options to select feature values to be deleted. 1396 oneof DeleteOption { 1397 // Select feature values to be deleted by specifying entities. 1398 SelectEntity select_entity = 2; 1399 1400 // Select feature values to be deleted by specifying time range and 1401 // features. 1402 SelectTimeRangeAndFeature select_time_range_and_feature = 3; 1403 } 1404 1405 // Required. The resource name of the EntityType grouping the Features for 1406 // which values are being deleted from. Format: 1407 // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}` 1408 string entity_type = 1 [ 1409 (google.api.field_behavior) = REQUIRED, 1410 (google.api.resource_reference) = { 1411 type: "aiplatform.googleapis.com/EntityType" 1412 } 1413 ]; 1414} 1415 1416// Response message for 1417// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues]. 1418message DeleteFeatureValuesResponse { 1419 // Response message if the request uses the SelectEntity option. 1420 message SelectEntity { 1421 // The count of deleted entity rows in the offline storage. 1422 // Each row corresponds to the combination of an entity ID and a timestamp. 1423 // One entity ID can have multiple rows in the offline storage. 1424 int64 offline_storage_deleted_entity_row_count = 1; 1425 1426 // The count of deleted entities in the online storage. 1427 // Each entity ID corresponds to one entity. 1428 int64 online_storage_deleted_entity_count = 2; 1429 } 1430 1431 // Response message if the request uses the SelectTimeRangeAndFeature option. 1432 message SelectTimeRangeAndFeature { 1433 // The count of the features or columns impacted. 1434 // This is the same as the feature count in the request. 1435 int64 impacted_feature_count = 1; 1436 1437 // The count of modified entity rows in the offline storage. 1438 // Each row corresponds to the combination of an entity ID and a timestamp. 1439 // One entity ID can have multiple rows in the offline storage. 1440 // Within each row, only the features specified in the request are 1441 // deleted. 1442 int64 offline_storage_modified_entity_row_count = 2; 1443 1444 // The count of modified entities in the online storage. 1445 // Each entity ID corresponds to one entity. 1446 // Within each entity, only the features specified in the request are 1447 // deleted. 1448 int64 online_storage_modified_entity_count = 3; 1449 } 1450 1451 // Response based on which delete option is specified in the 1452 // request 1453 oneof response { 1454 // Response for request specifying the entities to delete 1455 SelectEntity select_entity = 1; 1456 1457 // Response for request specifying time range and feature 1458 SelectTimeRangeAndFeature select_time_range_and_feature = 2; 1459 } 1460} 1461 1462// Selector for entityId. Getting ids from the given source. 1463message EntityIdSelector { 1464 // Details about the source data, including the location of the storage and 1465 // the format. 1466 oneof EntityIdsSource { 1467 // Source of Csv 1468 CsvSource csv_source = 3; 1469 } 1470 1471 // Source column that holds entity IDs. If not provided, entity IDs are 1472 // extracted from the column named entity_id. 1473 string entity_id_field = 5; 1474} 1475