---
title: "POST /v2/{+parent}/completionData:import"
method: POST
path: "/v2/{+parent}/completionData:import"
tags: ["projects"]
---

# POST /v2/{+parent}/completionData:import

`POST /v2/{+parent}/completionData:import`

Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudRetailV2ImportCompletionDataRequest — Request message for ImportCompletionData methods.
  - `inputConfig` GoogleCloudRetailV2CompletionDataInputConfig — The input config source for completion data.
    - `bigQuerySource` GoogleCloudRetailV2BigQuerySource — BigQuery source import data from.
      - `gcsStagingDir` string — Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.
      - `partitionDate` GoogleTypeDate — Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
        - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        - `day` integer — Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
      - `datasetId` string — Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.
      - `tableId` string — Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.
      - `dataSchema` string — The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for autocomplete imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.
      - `projectId` string — The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.
  - `notificationPubsubTopic` string — Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/retail.md) · [All operations](https://skmtc.net/google/apis/retail/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/retail/versions/146c67e59640/schema)
