Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: add deleteFeatureValues in aiplatform v1beta1 featurestore_serv…
Browse files Browse the repository at this point in the history
…ice.proto (#371)

* feat: add deleteFeatureValues in aiplatform v1beta1 featurestore_service.proto

PiperOrigin-RevId: 474635535

Source-Link: googleapis/googleapis@39c28bf

Source-Link: https://github.com/googleapis/googleapis-gen/commit/71f2abfb343562ce40b79c3b56fc97ec5a0dccb1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzFmMmFiZmIzNDM1NjJjZTQwYjc5YzNiNTZmYzk3ZWM1YTBkY2NiMSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 16, 2022
1 parent 6860cfd commit e1c5cd6
Show file tree
Hide file tree
Showing 10 changed files with 2,303 additions and 0 deletions.
77 changes: 77 additions & 0 deletions protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,29 @@ service FeaturestoreService {
};
}

// Delete Feature values from Featurestore.
//
// The progress of the deletion is tracked by the returned operation. The
// deleted feature values are guaranteed to be invisible to subsequent read
// operations after the operation is marked as successfully done.
//
// If a delete feature values operation fails, the feature values
// returned from reads and exports may be inconsistent. If consistency is
// required, the caller must retry the same delete request again and wait till
// the new operation returned is marked as successfully done.
rpc DeleteFeatureValues(DeleteFeatureValuesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{entity_type=projects/*/locations/*/featurestores/*/entityTypes/*}:deleteFeatureValues"
body: "*"
};
option (google.api.method_signature) = "entity_type";
option (google.longrunning.operation_info) = {
response_type: "DeleteFeatureValuesResponse"
metadata_type: "DeleteFeatureValuesOperationMetadata"
};
}

// Searches Features matching a query in a given project.
rpc SearchFeatures(SearchFeaturesRequest) returns (SearchFeaturesResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -1207,6 +1230,12 @@ message BatchReadFeatureValuesOperationMetadata {
GenericOperationMetadata generic_metadata = 1;
}

// Details of operations that delete Feature values.
message DeleteFeatureValuesOperationMetadata {
// Operation metadata for Featurestore delete Features values.
GenericOperationMetadata generic_metadata = 1;
}

// Details of operations that perform create EntityType.
message CreateEntityTypeOperationMetadata {
// Operation metadata for EntityType.
Expand All @@ -1224,3 +1253,51 @@ message BatchCreateFeaturesOperationMetadata {
// Operation metadata for Feature.
GenericOperationMetadata generic_metadata = 1;
}

// Request message for
// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues].
message DeleteFeatureValuesRequest {
// Message to select entity.
// If an entity id is selected, all the feature values corresponding to the
// entity id will be deleted, including the entityId.
message SelectEntity {
// Required. Selectors choosing feature values of which entity id to be
// deleted from the EntityType.
EntityIdSelector entity_id_selector = 1
[(google.api.field_behavior) = REQUIRED];
}

// Defines options to select feature values to be deleted.
oneof DeleteOption {
// Select feature values to be deleted by specifying entities.
SelectEntity select_entity = 2;
}

// Required. The resource name of the EntityType grouping the Features for
// which values are being deleted from. Format:
// `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
string entity_type = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/EntityType"
}
];
}

// Response message for
// [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues].
message DeleteFeatureValuesResponse {}

// Selector for entityId. Getting ids from the given source.
message EntityIdSelector {
// Details about the source data, including the location of the storage and
// the format.
oneof EntityIdsSource {
// Source of Csv
CsvSource csv_source = 3;
}

// Source column that holds entity IDs. If not provided, entity IDs are
// extracted from the column named `entity_id`.
string entity_id_field = 5;
}
521 changes: 521 additions & 0 deletions protos/protos.d.ts

Large diffs are not rendered by default.

1,126 changes: 1,126 additions & 0 deletions protos/protos.js

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(entityType) {
// [START aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Select feature values to be deleted by specifying entities.
*/
// const selectEntity = {}
/**
* Required. The resource name of the EntityType grouping the Features for
* which values are being deleted from. Format:
* `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`
*/
// const entityType = 'abc123'

// Imports the Aiplatform library
const {FeaturestoreServiceClient} = require('@google-cloud/aiplatform').v1beta1;

// Instantiates a client
const aiplatformClient = new FeaturestoreServiceClient();

async function callDeleteFeatureValues() {
// Construct request
const request = {
entityType,
};

// Run request
const [operation] = await aiplatformClient.deleteFeatureValues(request);
const [response] = await operation.promise();
console.log(response);
}

callDeleteFeatureValues();
// [END aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,50 @@
}
}
},
{
"regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_DeleteFeatureValues_async",
"title": "DatasetService deleteFeatureValues Sample",
"origin": "API_DEFINITION",
"description": " Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.",
"canonical": true,
"file": "featurestore_service.delete_feature_values.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 60,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "DeleteFeatureValues",
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues",
"async": true,
"parameters": [
{
"name": "select_entity",
"type": ".google.cloud.aiplatform.v1beta1.DeleteFeatureValuesRequest.SelectEntity"
},
{
"name": "entity_type",
"type": "TYPE_STRING"
}
],
"resultType": ".google.longrunning.Operation",
"client": {
"shortName": "FeaturestoreServiceClient",
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreServiceClient"
},
"method": {
"shortName": "DeleteFeatureValues",
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService.DeleteFeatureValues",
"service": {
"shortName": "FeaturestoreService",
"fullName": "google.cloud.aiplatform.v1beta1.FeaturestoreService"
}
}
}
},
{
"regionTag": "aiplatform_v1beta1_generated_FeaturestoreService_SearchFeatures_async",
"title": "DatasetService searchFeatures Sample",
Expand Down
Loading

0 comments on commit e1c5cd6

Please sign in to comment.