Skip to main content

dataset_versions

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

Overview

Namedataset_versions
TypeResource
Idgoogle.aiplatform.dataset_versions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of the DatasetVersion. Format: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
bigQueryDatasetNamestringOutput only. Name of the associated BigQuery dataset.
createTimestring (google-datetime)Output only. Timestamp when this DatasetVersion was created.
displayNamestringThe user-defined name of the DatasetVersion. The name can be up to 128 characters long and can consist of any UTF-8 characters.
etagstringUsed to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
metadataanyRequired. Output only. Additional information about the DatasetVersion.
modelReferencestringOutput only. Reference to the public base model last used by the dataset version. Only set for prompt dataset versions.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
updateTimestring (google-datetime)Output only. Timestamp when this DatasetVersion was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datasetsId, datasetVersionsIdreadMaskGets a Dataset version.
listselectprojectsId, locationsId, datasetsIdfilter, pageSize, pageToken, readMask, orderByLists DatasetVersions in a Dataset.
createinsertprojectsId, locationsId, datasetsIdCreate a version from a Dataset.
patchupdateprojectsId, locationsId, datasetsId, datasetVersionsIdupdateMaskUpdates a DatasetVersion.
deletedeleteprojectsId, locationsId, datasetsId, datasetVersionsIdDeletes a Dataset version.
restoreexecprojectsId, locationsId, datasetsId, datasetVersionsIdRestores a dataset version.

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
datasetVersionsIdstring
datasetsIdstring
locationsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)
updateMaskstring (google-fieldmask)

SELECT examples

Gets a Dataset version.

SELECT
name,
bigQueryDatasetName,
createTime,
displayName,
etag,
metadata,
modelReference,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.dataset_versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND datasetVersionsId = '{{ datasetVersionsId }}' -- required
AND readMask = '{{ readMask }}';

INSERT examples

Create a version from a Dataset.

INSERT INTO google.aiplatform.dataset_versions (
data__etag,
data__displayName,
projectsId,
locationsId,
datasetsId
)
SELECT
'{{ etag }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a DatasetVersion.

UPDATE google.aiplatform.dataset_versions
SET
data__etag = '{{ etag }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND datasetVersionsId = '{{ datasetVersionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
bigQueryDatasetName,
createTime,
displayName,
etag,
metadata,
modelReference,
satisfiesPzi,
satisfiesPzs,
updateTime;

DELETE examples

Deletes a Dataset version.

DELETE FROM google.aiplatform.dataset_versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND datasetVersionsId = '{{ datasetVersionsId }}' --required;

Lifecycle Methods

Restores a dataset version.

EXEC google.aiplatform.dataset_versions.restore 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@datasetVersionsId='{{ datasetVersionsId }}' --required;