Skip to main content

data_stores

Creates, updates, deletes, gets or lists a data_stores resource.

Overview

Namedata_stores
TypeResource
Idgoogle.discoveryengine.data_stores

Fields

NameDatatypeDescription
namestringImmutable. The full resource name of the data store. Format: projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
contentConfigstringImmutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.
createTimestringOutput only. Timestamp the DataStore was created at.
defaultSchemaIdstringOutput only. The id of the default Schema asscociated to this data store.
displayNamestringRequired. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
documentProcessingConfigobjectA singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.
industryVerticalstringImmutable. The industry vertical that the data store registers.
servingConfigDataStoreobjectStores information regarding the serving configurations at DataStore level.
solutionTypesarrayThe solutions that the data store enrolls. Available solutions for each industry_vertical: MEDIA: SOLUTION_TYPE_RECOMMENDATION and SOLUTION_TYPE_SEARCH. SITE_SEARCH: SOLUTION_TYPE_SEARCH is automatically enrolled. Other solutions cannot be enrolled.
startingSchemaobjectDefines the structure and layout of a type of document data.
workspaceConfigobjectConfig to store data store type configuration for workspace data

Methods

NameAccessible byRequired ParamsDescription
projects_locations_collections_data_stores_getSELECTcollectionsId, dataStoresId, locationsId, projectsIdGets a DataStore.
projects_locations_collections_data_stores_listSELECTcollectionsId, locationsId, projectsIdLists all the DataStores associated with the project.
projects_locations_data_stores_getSELECTdataStoresId, locationsId, projectsIdGets a DataStore.
projects_locations_data_stores_listSELECTlocationsId, projectsIdLists all the DataStores associated with the project.
projects_locations_collections_data_stores_createINSERTcollectionsId, locationsId, projectsIdCreates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.
projects_locations_data_stores_createINSERTlocationsId, projectsIdCreates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.
projects_locations_collections_data_stores_deleteDELETEcollectionsId, dataStoresId, locationsId, projectsIdDeletes a DataStore.
projects_locations_data_stores_deleteDELETEdataStoresId, locationsId, projectsIdDeletes a DataStore.
projects_locations_collections_data_stores_patchUPDATEcollectionsId, dataStoresId, locationsId, projectsIdUpdates a DataStore
projects_locations_data_stores_patchUPDATEdataStoresId, locationsId, projectsIdUpdates a DataStore
projects_locations_collections_data_stores_complete_queryEXECcollectionsId, dataStoresId, locationsId, projectsIdCompletes the specified user input with keyword suggestions.
projects_locations_collections_data_stores_train_custom_modelEXECcollectionsId, dataStoresId, locationsId, projectsIdTrains a custom model.
projects_locations_data_stores_complete_queryEXECdataStoresId, locationsId, projectsIdCompletes the specified user input with keyword suggestions.

SELECT examples

Lists all the DataStores associated with the project.

SELECT
name,
contentConfig,
createTime,
defaultSchemaId,
displayName,
documentProcessingConfig,
industryVertical,
servingConfigDataStore,
solutionTypes,
startingSchema,
workspaceConfig
FROM google.discoveryengine.data_stores
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_stores resource.

/*+ create */
INSERT INTO google.discoveryengine.data_stores (
locationsId,
projectsId,
name,
displayName,
industryVertical,
solutionTypes,
contentConfig,
workspaceConfig,
documentProcessingConfig,
startingSchema,
servingConfigDataStore
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ industryVertical }}',
'{{ solutionTypes }}',
'{{ contentConfig }}',
'{{ workspaceConfig }}',
'{{ documentProcessingConfig }}',
'{{ startingSchema }}',
'{{ servingConfigDataStore }}'
;

UPDATE example

Updates a data_stores resource.

/*+ update */
UPDATE google.discoveryengine.data_stores
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
industryVertical = '{{ industryVertical }}',
solutionTypes = '{{ solutionTypes }}',
contentConfig = '{{ contentConfig }}',
workspaceConfig = '{{ workspaceConfig }}',
documentProcessingConfig = '{{ documentProcessingConfig }}',
startingSchema = '{{ startingSchema }}',
servingConfigDataStore = '{{ servingConfigDataStore }}'
WHERE
dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified data_stores resource.

/*+ delete */
DELETE FROM google.discoveryengine.data_stores
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';