Full name: projects.locations.indexes.import
Imports an Index from an external source (e.g., BigQuery).
Endpoint
posthttps://{service-endpoint}/v1beta1/{name}:import
Where {service-endpoint} is one of the supported service endpoints.
Path parameters
namestring
Required. The name of the Index resource to import data to. Format: projects/{project}/locations/{location}/indexes/{index}
Request body
The request body contains data with the following structure:
isCompleteOverwriteboolean
Optional. If true, completely replace existing index data. Must be true for streaming update indexes.
Required. Configuration for importing data from an external source.
Response body
If successful, the response body contains an instance of Operation.
ConnectorConfig
Configuration for importing data from an external source.
sourceUnion type
source can be only one of the following:Configuration for importing data from a BigQuery table.
| JSON representation |
|---|
{
// source
"bigQuerySourceConfig": {
object ( |
BigQuerySourceConfig
Configuration for importing data from a BigQuery table.
tablePathstring
Required. The path to the BigQuery table containing the index data, in the format of bq://<projectId>.<datasetId>.<table>.
Required. Mapping of datapoint fields to BigQuery column names.
| JSON representation |
|---|
{
"tablePath": string,
"datapointFieldMapping": {
object ( |
DatapointFieldMapping
Mapping of datapoint fields to column names for columnar data sources.
idColumnstring
Required. The column with unique identifiers for each data point.
embeddingColumnstring
Required. The column with the vector embeddings for each data point.
Optional. List of restricts for string values.
Optional. List of restricts for numeric values.
metadataColumns[]string
Optional. List of columns containing metadata to be included in the index.
| JSON representation |
|---|
{ "idColumn": string, "embeddingColumn": string, "restricts": [ { object ( |
Restrict
Restrictions on string values.
namespacestring
Required. The namespace of the restrict in the index.
allowColumn[]string
Optional. The columns containing the allow values.
denyColumn[]string
Optional. The columns containing the deny values.
| JSON representation |
|---|
{ "namespace": string, "allowColumn": [ string ], "denyColumn": [ string ] } |
NumericRestrict
Restrictions on numeric values.
namespacestring
Required. The namespace of the restrict.
valueColumnstring
Optional. The column containing the numeric value.
Required. Numeric type of the restrict. Must be consistent for all datapoints within the namespace.
| JSON representation |
|---|
{
"namespace": string,
"valueColumn": string,
"valueType": enum ( |
ValueType
The type of numeric value for the restrict.
| Enums | |
|---|---|
VALUE_TYPE_UNSPECIFIED |
Should not be used. |
INT |
Represents 64 bit integer. |
FLOAT |
Represents 32 bit float. |
DOUBLE |
Represents 64 bit float. |