Google Retail Search Purging User Events

Hi everyone,

I'm trying out Google Cloud Retail Search recently, where I successfully ingested the bulk product catalog and user events. However, due to some reason I need to delete (purge) the user events to re upload the fresh ones. How can I do this?

Following 3 approaches are there that I have repeatedly tried to and failed,

  1. There is no option in the console to do, one must go for the CLI or client libraries (frustrating to know why there is no option in console for this basic task)

  2. I used the official documentation and used the command as below,
    Request:

curl -X POST \

-H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \

-H "Content-Type: application/json; charset=utf-8" \

-d '{

"filter": [FILTER EXPRESSION],

"force": [TRUE | FALSE]

}' \

'https://retail.googleapis.com/v2alpha/projects/[PROJECT NUMBER]/locations/global/catalogs/default_catalog/userEvents:purge'

Response:

{
"error": {
"code": 403,
"message": "Your application is authenticating by using local Application Default Credentials. The retail.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds .",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SERVICE_DISABLED",
"domain": "googleapis.com",
"metadata": {
"service": "retail.googleapis.com",
"consumer": "projects/618104708054"
}
}
]
}
}

Although, I have gone through all the steps for setting project quota and have got response for successful setup as below,

Quota project "sample-demo" was added to ADC which can be used by Google client libraries for billing and quota. Note that some services may still bill the project owning the resource.

Still no luck

3. I have used the official google tutorial using the client libraries, in an interactive tutorial with link as,
python tutorial to purge user events. However, it doesn't show any particular response of successful deletion/purging for the events. Hence, unable to determine if it worked or no or what really happened.

Appreciate, support in this regard.

0 0 80
0 REPLIES 0