Retail API auto-completion dataset import fails with code 13 (Internal error)

34 views
Skip to first unread message

Jorge Mario Loaiciga Rodriguez

unread,
Mar 13, 2022, 5:33:16 PMMar 13
to cloud-recommendations-users
Hello,

Hello,

We are following the step-by-step guide in the documentation (https://cloud.google.com/retail/docs/import-completion) to import a sample auto-completion dataset.

We first sent this request:

```
 curl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "X-Goog-User-Project:564423424476" "https://retail.googleapis.com/v2alpha/projects/galeria-retail-api/locations/global/catalogs/default_catalog/operations/10400371299807017424"
```

Just for reference, the content of the inputConfig.json file is:
```
{
    "inputConfig":{
        "bigQuerySource":{
            "projectId":"galeria-retail-api",
            "datasetId":"product_catalog_dev",
            "tableId":"auto_completion_20220311",
            "dataSchema":"suggestions"
        }
    }
}
```

When we tried to get the check of the import but Retail API returns the following error:
```
curl -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "X-Goog-User-Project:564423424476" "https://retail.googleapis.com/v2alpha/projects/galeria-retail-api/locations/global/catalogs/default_catalog/operations/815163310183687783"
{
  "name": "projects/564423424476/locations/global/catalogs/default_catalog/operations/815163310183687783",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.retail.v2.ImportMetadata",
    "createTime": "2022-03-13T14:56:31.526346716Z",
    "updateTime": "2022-03-13T14:57:04.570809Z",
    "requestId": "815163310183687783"
  },
  "done": true,
  "error": {
    "code": 13,
    "message": "Internal error encountered. Please try again. If the issue persists, please contact https://groups.google.com/g/cloud-recommendations-users for general issues, or retail-sea...@google.com for Retail Search specific issues."
  }
}
```

The Retail API interface in Cloud Console shows no sign of our import request in  the Import Activity window:
Screenshot 2022-03-13 4.09.41 PM.png

We would greatly appreciate if  you could please help us troubleshoot the internal error the Retail API is reporting? Is this a common issue? Is it possible to find any useful logs of the internal operation of Retail API in the Cloud Console?

Best Regards,

Jorge

Jorge Mario Loaiciga Rodriguez

unread,
Mar 14, 2022, 11:44:59 AMMar 14
to cloud-recommendations-users
We figured it out. The BQ dataset was in EU, but Retail API seems to read only BQ dataset on US. This was not documented and the error message did not offer any hints on this.

Jorge Mario Loaiciga Rodriguez

unread,
Mar 14, 2022, 11:45:02 AMMar 14
to cloud-recommendations-users

I should correct, the import command we sent is same as in the documentation: 

```
curl -X POST -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "Content-Type: application/json; charset=utf-8" -H "X-Goog-User-Project:564423424476" -d @./inputConfig.json "https://retail.googleapis.com/v2/projects/564423424476/locations/global/catalogs/default_catalog/completionData:import"
```

On Sunday, March 13, 2022 at 10:33:16 PM UTC+1 Jorge Mario Loaiciga Rodriguez wrote:
Reply all
Reply to author
Forward
0 new messages