Skip to main content

rag_corpora

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

Overview​

Namerag_corpora
TypeResource
Idgoogle.aiplatform.rag_corpora

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The resource name of the RagCorpus.
corpusStatusobjectOutput only. RagCorpus state. (id: GoogleCloudAiplatformV1CorpusStatus)
createTimestring (google-datetime)Output only. Timestamp when this RagCorpus was created.
descriptionstringOptional. The description of the RagCorpus.
displayNamestringRequired. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectOptional. Immutable. The CMEK key name used to encrypt at-rest data related to this Corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. (id: GoogleCloudAiplatformV1EncryptionSpec)
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
updateTimestring (google-datetime)Output only. Timestamp when this RagCorpus was last updated.
vectorDbConfigobjectOptional. Immutable. The config for the Vector DBs. (id: GoogleCloudAiplatformV1RagVectorDbConfig)
vertexAiSearchConfigobjectOptional. Immutable. The config for the Vertex AI Search. (id: GoogleCloudAiplatformV1VertexAiSearchConfig)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, ragCorporaIdGets a RagCorpus.
listselectprojectsId, locationsIdpageSize, pageTokenLists RagCorpora in a Location.
createinsertprojectsId, locationsIdCreates a RagCorpus.
patchupdateprojectsId, locationsId, ragCorporaIdUpdates a RagCorpus.
deletedeleteprojectsId, locationsId, ragCorporaIdforceDeletes a RagCorpus.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
ragCorporaIdstring
forceboolean
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Gets a RagCorpus.

SELECT
name,
corpusStatus,
createTime,
description,
displayName,
encryptionSpec,
satisfiesPzi,
satisfiesPzs,
updateTime,
vectorDbConfig,
vertexAiSearchConfig
FROM google.aiplatform.rag_corpora
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND ragCorporaId = '{{ ragCorporaId }}' -- required
;

INSERT examples​

Creates a RagCorpus.

INSERT INTO google.aiplatform.rag_corpora (
data__description,
data__displayName,
data__encryptionSpec,
data__vectorDbConfig,
data__vertexAiSearchConfig,
projectsId,
locationsId
)
SELECT
'{{ description }}',
'{{ displayName }}',
'{{ encryptionSpec }}',
'{{ vectorDbConfig }}',
'{{ vertexAiSearchConfig }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates a RagCorpus.

UPDATE google.aiplatform.rag_corpora
SET
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__encryptionSpec = '{{ encryptionSpec }}',
data__vectorDbConfig = '{{ vectorDbConfig }}',
data__vertexAiSearchConfig = '{{ vertexAiSearchConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND ragCorporaId = '{{ ragCorporaId }}' --required
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a RagCorpus.

DELETE FROM google.aiplatform.rag_corpora
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND ragCorporaId = '{{ ragCorporaId }}' --required
AND force = '{{ force }}'
;